This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: RFC: printing pointers to global (data) variable on Windows...
> So, supplying the flag makes gdb better model reality. In this sense it
> is an improvement. Now, whether it is a *useful* improvement... :)
This is true.
> It seems to me that the filter is correct: if you are on a platform
> where minimal symbol sizes are valid, and you see a symbol of size zero,
> it does not make sense to print such a symbol.
OK, that makes sense. We might even want to go a little further and
exclude symbols if our address is past the end of the symbol. For
instance, if we have a symbol "bla" at 0x1000, and its size is 4 bytes,
and we're calling our routine with 0x1008, I am not sure it makes
much sense saying 0x1008 is <bla+8>. But maybe it does?
> Joel> Another option is for the FSF version of GDB to remain as it is,
> Joel> with its bias towards GNU/Linux, while we will change AdaCore's
> Joel> version to turn "set print symbol" to "off" by default...
>
> If you disable "set print symbol", how would that differ from leaving
> the filter in place?
I was just sweeping the problem under the rug... Not making it the
default is my way of telling the users that the feature is not
completely prime-time; and so the minor quirks you can get on some
of the systems are to be expected. It would also save me a ton of
time not having to tweak the expected output in the testsuite, but
that's a minor detail.
I haven't decided about what to do with the default, but regardless,
I tend to think that you're right about flagging size-less symbols.
It will effectively disable the filter on COFF platforms, allowing
some symbols that would otherwise be filtered, but I guess that's
better than ignoring too many symbols...
I'll try working on that today.
Thanks, Tom.
--
Joel