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


Vladimir Prus schrieb:


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?

No, this was just to illustrate my example :-) Sorry if this was a confusing statement.
The symbol lookup takes places in the symbol table.

The following is an example from the combined debugger on Cell B./E. with some "SPU threads". I guess this was what I had in mind:

(gdb) info sharedlibrary
From To Syms Read Shared Object Library
0x0ffc1980  0x0ffdb3d0  Yes         /lib/ld.so.1
0x0fd5dd30  0x0fdbb4b0  Yes         /lib/libm.so.6
0x0fd14560  0x0fd225c0  Yes         /usr/lib/libspe2.so.2
0x0fe4d940  0x0ff6e3b0  Yes         /lib/libc.so.6
0xf7f943e0  0xf7fa3350  Yes         /lib/libpthread.so.0
0x0fa51820  0x0fa56d30  Yes         /lib/librt.so.1
0x0f542170  0x0f551e70  Yes         /lib/libgcc_s.so.1
0x00000030  0x00000960  Yes         break_spu_bin@0x10001f80 <5>
0x00000030  0x00000960  Yes         break_spu_bin@0x10001f80 <6>
0x00000030  0x00000960  Yes         break_spu_bin@0x10001f80 <7>
0x00000030  0x00000960  Yes         break_spu_bin@0x10001f80 <8>
0x00000030  0x00000960  Yes         break_spu_bin@0x10001f80 <9>
0x00000030  0x00000960  Yes         break_spu_bin@0x10001f80 <10>
0x00000030  0x00000960  Yes         break_spu_bin@0x10001f80 <11>
0x00000030  0x00000960  Yes         break_spu_bin@0x10001f80 <12>
(gdb) br foo
Breakpoint 9 at 0x10001800: file break.c, line 38.
(gdb) br foo2
[0] cancel
[1] all
[2] foo2 at break.c:76
[3] foo2 at break_spu_bin.c:46


Please see the testcase attached with an exmaple with a "foo" in each module.


Regards,
Markus

--
 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]