Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Jan Kratochvil <jan.kratochvil@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: RFC: partially fix empty DW_OP_piece
Date: Fri, 04 Jun 2010 21:39:00 -0000	[thread overview]
Message-ID: <m3k4qetr45.fsf@fleche.redhat.com> (raw)
In-Reply-To: <20100604191045.GA32716@host0.dyn.jankratochvil.net> (Jan	Kratochvil's message of "Fri, 4 Jun 2010 21:10:45 +0200")

>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:

Jan> OK, that probably means there really must remain a way to convert
Jan> `inferior dependent struct value' into an `inferior independent
Jan> struct value'.

Yeah, at least as far as the bounds are concerned.  IMO.

The current gdb model is sort of mixed.  A struct value is a snapshot of
some bit of state.  But, when printing a value, we might refer to other
state in the target.  For example:

    struct x { char *name; };

If we have a value of that type, gdb will try to dereference the pointer
when printing.  But, we make no attempt to save this memory alongside
the value somewhere.  So, if you have a complicated debug session and
then after many re-runs or whatever do "print $1", you can get weird
answers.

There may be some other odd cases, too.

We could fix this, of course, but it isn't clear that it is worth the
effort.

Tom


  reply	other threads:[~2010-06-04 21:39 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-14  6:39 Tom Tromey
2010-05-14 22:51 ` Jan Kratochvil
2010-05-21 19:48   ` Tom Tromey
2010-06-01 17:34   ` Tom Tromey
2010-06-02 18:54     ` Jan Kratochvil
2010-06-02 20:07       ` Tom Tromey
2010-06-03 17:46         ` Jan Kratochvil
2010-06-04 19:05           ` Tom Tromey
2010-06-04 19:10             ` Jan Kratochvil
2010-06-04 21:39               ` Tom Tromey [this message]
2010-06-04 21:47                 ` Jan Kratochvil
2010-05-20 23:04 ` 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=m3k4qetr45.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@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