Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Markus Deuling <deuling@de.ibm.com>
To: Daniel Jacobowitz <drow@false.org>,
	        GDB Patches <gdb-patches@sourceware.org>
Cc: Ulrich Weigand <uweigand@de.ibm.com>
Subject: Re: [PING] [rfc]: Framework for looking up multiply defined global  	symbols  in shared libraries
Date: Thu, 10 May 2007 14:52:00 -0000	[thread overview]
Message-ID: <4643315F.3070900@de.ibm.com> (raw)
In-Reply-To: <20070510130030.GA7248@caradoc.them.org>

Daniel Jacobowitz wrote:
>> As an example I implemented a special lookup routine for ELF shared libraries
>> linked with -Bsymbolic. While the focus is within such a library, the global 
>> symbol lookup shall first search for the symbol within this library and then
>> go through the main executable if not found.
> 
> Is this the point of the patch, or just an example?  I mean, what else
> would you use this for besides -Bsymbolic?
> 
> There's some benefit to looking up the right symbol, e.g. for "print
> foo()".  But for breakpoints, I still think the way to go is to
> breakpoint all functions with the same name and/or allow the user to
> specify a copy explicitly (apparently DBX does the latter).
> 

The lookup for the '-Bsymbolic' library is just one example.

ELF says that the symbol resolution algorithm for that kind of library shall start
within the library instead of the main executable. If this lookup fails the "normal"
lookup starting in the main executable shall take place.

There'll be another patch using that lookup framework for the combined debugger for Cell.
If GDB debugs a Cell binary and stands in a SPU thread (which GDB thinks of as a library) 
then the lookup of a symbol would prefer the symbol in the main executable (in the PPE thread)
if available. The second patch using that framework makes sure that a symbol lookup within
a SPU thread prefers symbols from that SPU thread.

This framework also makes it possible for other library handlers (sorry, I don't know any examples now) to 
install their own callbacks if the want to have own algorithms for symbol lookup.


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


  reply	other threads:[~2007-05-10 14:52 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-10 12:33 Markus Deuling
2007-05-10 13:00 ` Daniel Jacobowitz
2007-05-10 14:52   ` Markus Deuling [this message]
2007-05-14 17:53     ` Daniel Jacobowitz
2007-05-14 18:25 ` Daniel Jacobowitz
2007-05-15  5:49   ` Markus Deuling
2007-05-18  4:13     ` Markus Deuling
2007-05-31 21:40       ` Ulrich Weigand
2007-06-05  3:46         ` Markus Deuling
2007-06-20  6:58           ` [PING 2] " Markus Deuling
2007-06-26 18:31             ` Joel Brobecker
2007-06-26 18:35             ` Joel Brobecker
2007-06-26 20:34               ` Markus Deuling
2007-06-28 15:32                 ` Ulrich Weigand
2007-06-28 15:33                   ` Joel Brobecker
2007-06-28 18:20                   ` Markus Deuling
2007-06-29 17:03                     ` Eli Zaretskii
2007-07-02 18:24                     ` Ulrich Weigand
2007-07-03  4:04                       ` Markus Deuling
2007-07-03 12:17                         ` Ulrich Weigand
2007-07-03 12:28                           ` Daniel Jacobowitz
2007-07-04  3:50                           ` Markus Deuling
2007-06-29 17:15                   ` Eli Zaretskii
2007-06-25 21:48           ` [PING] " Kevin Buettner

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=4643315F.3070900@de.ibm.com \
    --to=deuling@de.ibm.com \
    --cc=drow@false.org \
    --cc=gdb-patches@sourceware.org \
    --cc=uweigand@de.ibm.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