This is the mail archive of the
mailing list for the GDB project.
RE: Differentiating symbols in multiple copies of shared libraries
- From: Avi Gozlan <avi at checkpoint dot com>
- To: "'Tom Tromey'" <tromey at redhat dot com>
- Cc: "'gdb at sourceware dot org'" <gdb at sourceware dot org>, Avi Gozlan <avi at checkpoint dot com>, Matan Ben Gur <matanbg at checkpoint dot com>
- Date: Sun, 23 Jan 2011 14:07:21 +0200
- Subject: RE: Differentiating symbols in multiple copies of shared libraries
- References: <9C4E85B61203CD419BB3A638E5F6833301A37EBFB20B@il-ex01.ad.checkpoint.com> <email@example.com>
A developer in our organization added some code to allow differentiation between symbols with the same name in different object files. This feature is enabled once a GDB variable called symlib is set.
Presumably this addition is not written according to GNU policy or GDB conventions, yet this feature is important as discussed below.
Could you recommend on a procedure for promoting this required feature (or anyway merge the source code to GDB)? Is there any contact for working with for forwarding the implementation (currently diff in 4 files: minsym.c, stack.c, symtab.h, symtab.c)?
From: Tom Tromey [mailto:firstname.lastname@example.org]
Sent: Thursday, December 09, 2010 11:53 PM
To: Avi Gozlan
Subject: Re: Differentiating symbols in multiple copies of shared libraries
>>>>> "Avi" == Avi Gozlan <email@example.com> writes:
Avi> We did not find a way for GDB to refer to a symbol in a specific
Avi> copy of the object file (other then referring to the specific
There is currently no way to do this.
Avi> Please note that we need to differentiate between symbols not only
Avi> for defining breakpoints but for other needs such as disassembly,
Avi> backtrace as well.
Avi> Your input regarding this issue will be appreciated.
I think it would be a welcome addition to gdb.
The dbx syntax doesn't seem particular gdb-ish to me, but it would do.
HPD-like syntax along the lines of "#libfoo.so#function" has also been
If you implement this in linespecs, which is the natural approach, then
it will automatically work for disassembly.
For "backtrace", I guess you mean that at least ambiguous symbols should
be printed in this syntax in a backtrace. I'm sure that is doable as
I am not sure whether anybody is working on this. At the very least,
please file a bug.