This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: store.exp failure on i686-linux with newer gcc's


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]