This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH V4] symlookup: improves symbol lookup when a file is specified.
On 2017-10-20 03:45 AM, Tedeschi, Walfred wrote:
> Hi Simon,
>
> Thanks for your review!
> For all the comment above I agree, Thanks again!
>
> For the one below there are different point of views.
> How I see it: Very few sane people will add a symbols in a shared library that
> will collide like the case we presented here. If one does so how can the debugger
> help?
I think one usual use case is plugins implemented with shared library. Although
the data symbols will commonly be static, and the plugin will only expose some
function symbols.
> Providing the same value as the runtime or linker does?
> This one user already knows.
> Or providing what the debug information provides as value created by the library itself.
> In final end both are right. :|
>
> But when specifying the scope if user is provided the value of the debug info it should
> be easier to spot that there is something weird going on in the code.
I think what you just said summarizes the problem well and I think it makes sense.
I just don't think I have enough experience about symbol handling to understand
the situation fully. Could another maintainer with more experience about symbols
give the final ok?
> That was my rationale.
>
> Perhaps, the debugger could here even provide a new command to analyze those colliding symbols.
Yes, and maybe a way to print all symbols with a given name, with some info
about where they come from.
Simon