This is the mail archive of the gdb-patches@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: RFC: partially fix empty DW_OP_piece


>>>>> "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


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