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.133.124]) by sourceware.org (Postfix) with ESMTPS id 38FCB3883032 for ; Wed, 26 Oct 2022 15:57:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 38FCB3883032 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=1666799859; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JTnU/9+CcKn1A7mGoJhLUOf9Ho6rNQsvWXsf0HicJ5g=; b=RjjrOQY6MLyLEcitF2YVaeDpDCl2GPnm/gb2sy/bdzXq80fikBxOgeB18FyhXsdHU8CMJ5 LjGrca2aVjO76cZB3Fyg8865CYny2Xlt8P+ru0uNNqRIb8ZEJQUhUWeTXYm4q/cKwEzVyK f+Nhe5WXmxz6oT7fIjlKUZ9t/rVRwTk= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-414-H40M7ppoOeC18_mZCNw9Rg-1; Wed, 26 Oct 2022 11:57:35 -0400 X-MC-Unique: H40M7ppoOeC18_mZCNw9Rg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id AA4983826A48 for ; Wed, 26 Oct 2022 15:57:35 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.22.33.155]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1CCE7111F3B6; Wed, 26 Oct 2022 15:57:35 +0000 (UTC) From: Bruno Larsen To: gdb-patches@sourceware.org Cc: Bruno Larsen Subject: [PATCH 0/2] Improve handling of using directives Date: Wed, 26 Oct 2022 17:50:52 +0200 Message-Id: <20221026155053.3394792-1-blarsen@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-Spam-Status: No, score=-6.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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: 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. 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 | 50 +++++++++++++++++++++++++++----- gdb/dwarf2/read.c | 30 ++++++++++++++++++- gdb/namespace.c | 26 +++++++++++++++++ gdb/namespace.h | 14 ++++++++- gdb/testsuite/gdb.cp/nsusing.cc | 3 +- gdb/testsuite/gdb.cp/nsusing.exp | 27 +++++++++++++++-- 6 files changed, 137 insertions(+), 13 deletions(-) -- 2.37.3