[patch]: User choice for multiply-defined symbols

Daniel Jacobowitz drow@false.org
Wed May 7 22:00:00 GMT 2008


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



More information about the Gdb-patches mailing list