This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch]: User choice for multiply-defined symbols


Daniel Jacobowitz schrieb:
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?


It improves user experience. If there are symbols with the same name (it doesn't care about the signature of a function) in different modules of your application you *can* now ask GDB to let you choose
which of them to take. Normal operation would be to return the first symbol found.


Another advantage is, that the user is now able to choose one or more symbols from the list. For example:

(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 [4] foo at ../../../../src/gdb/testsuite/gdb.base/multiple_symbols_two.c:42
[5] foo at ../../../../src/gdb/testsuite/gdb.base/multiple_symbols_three.c:23


The user can choose for example symbol 3 and 5 for setting a breakpoint.


-- Markus Deuling GNU Toolchain for Linux on Cell BE deuling@de.ibm.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]