OSDN Git Service

* value.h (allocate_value_lazy): New function declaration.
authorguitton <guitton>
Wed, 26 Nov 2008 16:27:26 +0000 (16:27 +0000)
committerguitton <guitton>
Wed, 26 Nov 2008 16:27:26 +0000 (16:27 +0000)
commit75014c8dbda01b3d8ee05c831c794060b89cbc3c
treeb787efb219d4af5c25bdae773b4bc9038dd26bfa
parente260d7946735613651ac748306cb6914c038dc9c
* value.h (allocate_value_lazy): New function declaration.
(value_free): Remove macro, make it a function.
* value.c (value): Move actual content outside of the memory space
of the struct; add a pointer to this actual content.
(allocate_value_lazy, allocate_value_contents): New function.
(allocate_value): Reimplement using these two new functions.
(value_contents_raw, value_contents_all_raw): If no memory
has been allocated yet for the actual content, allocate it.
(value_contents_all): Resync with struct value's changes.
(value_free): New function.
(value_copy, value_primitive_field): Use new function
allocate_value_lazy to allocate lazy values.
(value_change_enclosing_type): Resync with struct value's changes.
As the value is not reallocated, remove the special handling for
the value chain (now obsolete).
* valops.c (value_at_lazy): Use new function allocate_value_lazy.
(value_fetch_lazy): Allocate value content. Use allocate_value_lazy
to allocate lazy values.
(value_slice): Use allocate_value_lazy to allocate lazy values.
gdb/ChangeLog
gdb/valops.c
gdb/value.c
gdb/value.h