From: Nathan Froyd <froydnj@codesourcery.com>
To: Tom Tromey <tromey@redhat.com>
Cc: Doug Evans <dje@google.com>, Pedro Alves <pedro@codesourcery.com>,
gdb@sourceware.org
Subject: Re: store.exp failure on i686-linux with newer gcc's
Date: Fri, 04 Sep 2009 17:49:00 -0000 [thread overview]
Message-ID: <20090904174903.GV29075@codesourcery.com> (raw)
In-Reply-To: <m3ws4ebsrs.fsf@fleche.redhat.com>
On Fri, Sep 04, 2009 at 10:04:39AM -0600, Tom Tromey wrote:
> Nice patch.
Thanks.
> Nathan> +static void
> Nathan> +write_pieced_value (struct value *to, struct value *from)
> Nathan> +{
> [...]
> Nathan> + struct frame_info *frame = frame_find_by_id (VALUE_FRAME_ID (to));
> Nathan> +
> Nathan> + if (frame == NULL)
> Nathan> + {
> Nathan> + set_value_optimized_out (to, 1);
>
> What impact does this have on the error messages the user sees?
> I didn't try to trace through the code; will setting a variable in this
> scenario give an error? (Or silently do nothing?)
>
> Second, this seems like a change in behavior for the value history.
> Suppose the user does "print local", which uses this machinery.
> Then the inferior exits. Then the user does "print $1" or whatever...
> this ought to print the same value, but now I think the user will get an
> error.
I'm not really sure if that case is even reachable (likewise for the
read case); I'd be happy to consider scenarios where it might be. If
you do something like:
(gdb) break foo
(gdb) cont
(gdb) p local
$3 = ...
(gdb) finish
(gdb) p $3
that works just fine. Similarly if you let the inferior finish.
Writing to $3 is disallowed ("Left operand of assignment is not a
modifiable lvalue.") I think everything works as you would expect.
> So, perhaps it is better to continue to copy in the bits eagerly
> instead of postponing them to read_pieced_value.
I'm not exactly sure what you mean here. At least for values where some
of the pieces live in registers, if you don't have the frame for the
value, you can't write to the register, correct?
-Nathan
next prev parent reply other threads:[~2009-09-04 17:49 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-03 21:50 Doug Evans
2009-09-03 21:58 ` Joel Brobecker
2009-09-03 22:04 ` Pedro Alves
2009-09-03 22:17 ` Doug Evans
2009-09-03 23:44 ` Nathan Froyd
2009-09-04 16:05 ` Tom Tromey
2009-09-04 17:49 ` Nathan Froyd [this message]
2009-09-04 18:38 ` Tom Tromey
2009-09-04 20:17 ` Nathan Froyd
2009-09-04 20:18 ` Doug Evans
2009-09-04 21:23 ` Tom Tromey
2009-09-04 21:28 ` Daniel Jacobowitz
2009-09-04 22:28 ` Tom Tromey
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=20090904174903.GV29075@codesourcery.com \
--to=froydnj@codesourcery.com \
--cc=dje@google.com \
--cc=gdb@sourceware.org \
--cc=pedro@codesourcery.com \
--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