Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
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	[thread overview]
Message-ID: <1504550858-27936-1-git-send-email-palves@redhat.com> (raw)

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


             reply	other threads:[~2017-09-04 18:47 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-04 18:47 Pedro Alves [this message]
2017-09-04 18:47 ` [PATCH 1/2] Fix "list ambiguous_variable" Pedro Alves
2017-09-06 18:41   ` Keith Seitz
2017-09-20 15:25     ` Pedro Alves
2017-10-16 15:03       ` Simon Marchi
2017-11-25  7:40         ` ppc64 regression: " Jan Kratochvil
2017-11-26 16:38           ` Ulrich Weigand
2017-11-29 19:08             ` [PATCH] Fix setting-breakpoints regression on PPC64 (function descriptors) (was: Re: ppc64 regression: [PATCH 1/2] Fix "list ambiguous_variable") Pedro Alves
2017-11-29 19:20               ` [PATCH] Fix setting-breakpoints regression on PPC64 (function descriptors) (was: Re: ppc64 regression: [PATCH 1/2] Fix "list amb Ulrich Weigand
2017-11-29 19:28                 ` Pedro Alves
2017-12-08  9:44               ` [PATCH] Fix setting-breakpoints regression on PPC64 (function descriptors) Yao Qi
2017-12-08 11:34                 ` Pedro Alves
2017-12-08 16:57                   ` Yao Qi
2017-09-04 18:47 ` [PATCH 2/2] Make "list ambiguous" show symbol names too Pedro Alves
2017-09-06 18:43   ` Keith Seitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1504550858-27936-1-git-send-email-palves@redhat.com \
    --to=palves@redhat.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox