This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: RFC: partially fix empty DW_OP_piece
On Wed, 02 Jun 2010 22:07:41 +0200, Tom Tromey wrote:
> I think the current gdb model is that a value is a snapshot of some
> inferior state at a particular moment.
>
> So, for VLA I would say that the bounds ought to be fixed at the time
> the snapshot is taken. I suppose this would mean introducing some copy
> of the type.
That is interesting idea (and currently in the VLA patch it happens that way).
Still it is probably really needed only for the GDB values history.
> Right now what I've done is change val_print to:
>
> int
> val_print (struct type *type, const gdb_byte *valaddr, int embedded_offset,
> CORE_ADDR address, struct ui_file *stream, int recurse,
> const struct value *val,
> const struct value_print_options *options,
> const struct language_defn *language)
>
> That is, I added the new 'val' argument. This is only used for bit
> validity testing.
As we talked with Tom he has already the patch coded+working. I thought only
a plan for his coding is being discussed now. Therefore leaving the VLA
design decision for a later point unrelated to his current patch.
Thanks,
Jan