Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH 0/2] Make "list ambiguous" show symbol names too
@ 2017-09-04 18:47 Pedro Alves
  2017-09-04 18:47 ` [PATCH 1/2] Fix "list ambiguous_variable" Pedro Alves
  2017-09-04 18:47 ` [PATCH 2/2] Make "list ambiguous" show symbol names too Pedro Alves
  0 siblings, 2 replies; 15+ messages in thread
From: Pedro Alves @ 2017-09-04 18:47 UTC (permalink / raw)
  To: gdb-patches

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


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2017-12-08 16:57 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-04 18:47 [PATCH 0/2] Make "list ambiguous" show symbol names too Pedro Alves
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox