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


Markus Deuling wrote:

> Hello,
> 
> the following patch makes use of the new "multiple-symbols" command introduced by Joel.
> 
> If there is more than one symbol associated with a name and the multiple-symbols flag is set
> to "ask", the user is asked to choose which of the symbols to use:
> 
> (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
>> 3
> Breakpoint 6 at 0x100004b0: file ../../../../src/gdb/testsuite/gdb.base/multiple_symbols.c, line
> 14.
> 
> I extended "search_symbols" by a distinct flag. If set the new function "distinct_search_syms" is
> called before returning the search result. As the name says, this function removes duplicates from
> the search result.
> 
> For exmaple:
> 
> If GDB debugs a threaded application with a symbol "foo" in every thread, there would be a user
> choice like:
> 
> [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_mod.c:5
> [4] foo at ../../../../src/gdb/testsuite/gdb.base/multiple_symbols_mod.c:5

I'm not sure -- are we searching for a symbol in each thread? That seems a little
bit strange -- did I miss some recent development?

- Volodya



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