Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: Tom Tromey <tromey@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: RFC: printing pointers to global (data) variable on Windows...
Date: Tue, 21 Aug 2012 15:36:00 -0000	[thread overview]
Message-ID: <20120821153627.GS2798@adacore.com> (raw)
In-Reply-To: <87r4r1h2u4.fsf@fleche.redhat.com>

> 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


  reply	other threads:[~2012-08-21 15:36 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-16 15:23 Joel Brobecker
2012-08-16 20:07 ` Tom Tromey
2012-08-16 22:45   ` Joel Brobecker
2012-08-17 14:23     ` Tom Tromey
2012-08-17 23:16       ` Joel Brobecker
2012-08-20 15:09         ` Joel Brobecker
2012-08-20 17:50           ` Tom Tromey
2012-08-21 15:28             ` Joel Brobecker
2012-08-20 17:48         ` Tom Tromey
2012-08-21 15:36           ` Joel Brobecker [this message]
2012-09-05 14:44             ` Joel Brobecker
2012-09-06  1:28               ` asmwarrior
2012-09-06  1:44                 ` Joel Brobecker
2012-09-06  2:03                   ` asmwarrior
2012-09-10 19:08               ` Tom Tromey
2012-09-10 22:13                 ` Joel Brobecker
2012-09-11 13:49                   ` Tom Tromey
2012-09-11 21:27                     ` Joel Brobecker

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=20120821153627.GS2798@adacore.com \
    --to=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tromey@redhat.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