From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32553 invoked by alias); 4 Sep 2017 18:47:46 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 32186 invoked by uid 89); 4 Sep 2017 18:47:45 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-5.9 required=5.0 tests=BAYES_00,GIT_PATCH_2,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1470 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 04 Sep 2017 18:47:41 +0000 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B380D4E4CA for ; Mon, 4 Sep 2017 18:47:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com B380D4E4CA Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=palves@redhat.com Received: from cascais.lan (ovpn04.gateway.prod.ext.ams2.redhat.com [10.39.146.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4683A6047B for ; Mon, 4 Sep 2017 18:47:39 +0000 (UTC) From: Pedro Alves To: gdb-patches@sourceware.org Subject: [PATCH 0/2] Make "list ambiguous" show symbol names too Date: Mon, 04 Sep 2017 18:47:00 -0000 Message-Id: <1504550858-27936-1-git-send-email-palves@redhat.com> X-SW-Source: 2017-09/txt/msg00061.txt.bz2 This series makes "list ambiguous" a bit clearer by printing the symbol name for each of the ambiguous locations as well: (gdb) list bar,main Specified first line 'bar' is ambiguous: file: "src/gdb/testsuite/gdb.cp/overload.cc", line number: 97, symbol: "bar(A)" file: "src/gdb/testsuite/gdb.cp/overload.cc", line number: 98, symbol: "bar(B)" ^^^^^^^^^^^^^^^^^ (gdb) list bar file: "src/gdb/testsuite/gdb.cp/overload.cc", line number: 97, symbol: "bar(A)" 96 97 int bar (A) { return 11; } file: "src/gdb/testsuite/gdb.cp/overload.cc", line number: 98, symbol: "bar(B)" 97 int bar (A) { return 11; } 98 int bar (B) { return 22; } ^^^^^^^^^^^^^^^^^ The "symbol: ..." parts above are new. That's patch #2. While working on that, I decided to test also the case of "list ambiguous_global_variable", which exposed the fact that that doesn't really work... So I fixed it too. That's patch #1. Tested on x86-64 Fedora 23. Pedro Alves (2): Fix "list ambiguous_variable" Make "list ambiguous" show symbol names too gdb/cli/cli-cmds.c | 29 ++++++++++---- gdb/linespec.c | 63 +++++++++++++++++++------------ gdb/symtab.c | 2 + gdb/symtab.h | 1 + gdb/testsuite/gdb.base/list-ambiguous.exp | 41 +++++++++++--------- gdb/testsuite/gdb.base/list-ambiguous0.c | 5 ++- gdb/testsuite/gdb.base/list-ambiguous1.c | 5 ++- gdb/testsuite/gdb.cp/overload.exp | 4 +- 8 files changed, 93 insertions(+), 57 deletions(-) -- 2.5.5