From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 7A221383556B for ; Wed, 7 Dec 2022 13:53:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7A221383556B Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1670421186; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=tq8SJ4o1Tc3+kdfA6DNxBszO3yDgV3R9Dxq+Zu4mLDc=; b=fS+0o98l4+fB2cxEH8LvQ+ql1Z1wbuRw/G99rFyBVPByHaYNnptIWylixLVKCug2aJvrmx XjHelhmiP97LSDUxSF+32SuhxIjO0HFTyJxbw/OFIqoTwWZBZR1p5c1dGqeGrThX6XOjcL P8TLlHOseHI85tsDxNe75khfttGd6B4= Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-497-zCiEgR1qOX6Z2Vy_s8wjGA-1; Wed, 07 Dec 2022 08:53:05 -0500 X-MC-Unique: zCiEgR1qOX6Z2Vy_s8wjGA-1 Received: by mail-ej1-f71.google.com with SMTP id qa30-20020a170907869e00b007c106529379so3410328ejc.8 for ; Wed, 07 Dec 2022 05:53:04 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=tq8SJ4o1Tc3+kdfA6DNxBszO3yDgV3R9Dxq+Zu4mLDc=; b=x63Ct2sixmchfBJ07YUH4EmLGY1Q+Lpj3mAsudD/ORNMLd64zF4snZ5yKeW0CiOPeK jFpr9GoEwp1haDU1AriVkDKoqtO6lNew/c7LS4pEOMcb1L6DXWfm0Y0vRYddUlwJA0fm jvbrta/tNViLDKK1tULHffkapID1KXBuyk+GeT99LcR/b9WYLgczmSGNIMDxm623mTcI GGVB6l5GlskFRnqJfiYg5Tj6Y923BSkj/03ybIUS9lOLirYLQ3BvjIQOwJ6Hj1GiaHYN qy+yvD9OV+1ktbeLWa6QxwH804WcOc3inS3oeE8nvkIjY05V15hv5eWGYcNQXaAYkz7Z +zzw== X-Gm-Message-State: ANoB5pnR2ZdwgaLScrKELzM7oLD6htZbhX1G7RoJQg2y1lyL+C3k1LZU XEiXWX6X/lzlAyZY0sp8SO05d2fqgr1GbHSe1oi8ZhuV70jgA1fNuUy8ogZbKr86pZrQ4vD5/hl h7ZWR6NypYQn/GHadeFt1jA== X-Received: by 2002:a17:906:9f09:b0:7bc:db1b:206f with SMTP id fy9-20020a1709069f0900b007bcdb1b206fmr13142736ejc.719.1670421183885; Wed, 07 Dec 2022 05:53:03 -0800 (PST) X-Google-Smtp-Source: AA0mqf5zgXGcdKpIS9jGDScav2abl0DYxzAUiTUDLTEWqdIVvNrJNRrOOi9xwDk90kYOB4fLSWntEA== X-Received: by 2002:a17:906:9f09:b0:7bc:db1b:206f with SMTP id fy9-20020a1709069f0900b007bcdb1b206fmr13142724ejc.719.1670421183671; Wed, 07 Dec 2022 05:53:03 -0800 (PST) Received: from [10.202.9.92] (nat-pool-brq-u.redhat.com. [213.175.37.12]) by smtp.gmail.com with ESMTPSA id 7-20020a170906300700b007812ba2a360sm8609471ejz.149.2022.12.07.05.53.03 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 07 Dec 2022 05:53:03 -0800 (PST) Message-ID: <0d3c9d9a-a55c-e137-2a80-bf23f7866ce8@redhat.com> Date: Wed, 7 Dec 2022 14:53:02 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: Re: [PATCH v3 0/2] Improve handling of using directives To: Bruno Larsen , Bruno Larsen via Gdb-patches References: <20221122113319.1760546-1-blarsen@redhat.com> From: Bruno Larsen In-Reply-To: <20221122113319.1760546-1-blarsen@redhat.com> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Ping! -- Cheers, Bruno On 22/11/2022 12:33, Bruno Larsen wrote: > This series tries to fix two of the main issues I saw when trying to get > gdb.cp/nsusing.exp working with clang. The first issue was that GDB > wouldn't care about when the 'using' directive happened in the code, > even if we were stopped before it, it was considered valid. The second > was that GDB would find the first reasonable variable in the imported > declarations and leave early, not caring about whether that variable was > ambiguous or not. Each of my patches fixes one of those issues. > > Changelog for v3: > * changed map key to use std::string, so we get an ordered output. > * Improved documentation on some spots > * Fix bug where gdb could return a partial list of the ambiguous symbols > > Changelog for v2: > * factored out some code to avoid unnecessary repetition. > * made it so ambiguous variables are explicitly reported > * fixed formatting issues. > > Bruno Larsen (2): > gdb/c++: validate 'using' directives based on the current line > gdb/c++: Detect ambiguous variables in imported namespaces > > gdb/cp-namespace.c | 99 ++++++++++++++++++++++++-------- > gdb/dwarf2/read.c | 30 +++++++++- > gdb/namespace.c | 25 ++++++++ > gdb/namespace.h | 16 +++++- > gdb/testsuite/gdb.cp/nsusing.cc | 3 +- > gdb/testsuite/gdb.cp/nsusing.exp | 25 +++++++- > 6 files changed, 167 insertions(+), 31 deletions(-) >