This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] choose symbol from given block's objfile first.
On 05/10/2012 03:50 PM, Matt Rice wrote:
> On Thu, May 10, 2012 at 7:32 AM, Tom Tromey <tromey@redhat.com> wrote:
>>>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:
>>
>> Pedro> <pedantic mode>
>> Pedro> Still, this wouldn't solve the case of loading the same
>> Pedro> library twice... Which symbol would you print?
>> Pedro> </pedantic mode>
>>
>> Yeah, we'd need additional syntax for that.
>>
>> One idea that came up on irc was to have 'info var' print the address of
>> variables. That way you could always at least find the address of the
>> one you want.
>
> another idea (inspired by the handle returned by dlopen, argument to
> dlsym and friends), is something like
>
> (gdb) print libsomething.so@1::this_library_version
> (gdb) print libsomething.so@2::this_library_version
>
> and some associated command to get a list of libraries and their handle.
Sounds like a good idea. "info sharedlibrary" itself could show
the unambiguous handles.
--
Pedro Alves