Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Markus Deuling <deuling@de.ibm.com>
To: Vladimir Prus <vladimir@codesourcery.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [patch]: User choice for multiply-defined symbols
Date: Mon, 05 May 2008 10:11:00 -0000	[thread overview]
Message-ID: <481ED021.9020207@de.ibm.com> (raw)
In-Reply-To: <fvmgsn$9av$1@ger.gmane.org>

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


  reply	other threads:[~2008-05-05  9:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-05  8:36 Markus Deuling
2008-05-05  9:06 ` Vladimir Prus
2008-05-05 10:11   ` Markus Deuling [this message]
2008-05-05 12:58 ` Daniel Jacobowitz
2008-05-07 11:36   ` Markus Deuling
2008-05-07 22:00     ` Daniel Jacobowitz
2008-05-08 11:43       ` Markus Deuling
2008-05-08 16:33         ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=481ED021.9020207@de.ibm.com \
    --to=deuling@de.ibm.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=vladimir@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox