This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch]: User choice for multiply-defined symbols
On Wed, May 07, 2008 at 06:32:31AM +0200, Markus Deuling wrote:
> (gdb) break foo
> [0] cancel
> [1] all
> [2] foo at ../../../../src/gdb/testsuite/gdb.base/multiple_symbols_mod.c:5
> [3] foo at ../../../../src/gdb/testsuite/gdb.base/multiple_symbols.c:14
>
> Without the patch GDB would take the first symbol "foo" it finds. I guess this would be the one in the main
> executable in this case. To set a breakpoint at "foo" in multiple_symbols_mod.c the user has to explicitly
> mention it. This exmaple shows the behaviour without patch:
GDB has done this for years and years. I guess these are just normal
C symbols rather than C++ overloaded symbols, though, so that's the
difference?
I'm worried about all the different ways of dealing with lists of
symbols. If we can already ask to set a breakpoint at foo(int) or
foo(int, int) why does this code have to be in a separate place?
--
Daniel Jacobowitz
CodeSourcery