diff options
author | Pedro Alves <pedro@codesourcery.com> | 2011-01-25 15:18:34 +0000 |
---|---|---|
committer | Pedro Alves <pedro@codesourcery.com> | 2011-01-25 15:18:34 +0000 |
commit | a5ef5cee8f062d0e83f8763214de964556dd6968 (patch) | |
tree | 43f942e806b3c647854b059ad02f816bdafa4453 /gdb/value.c | |
parent | 9a764ccdbb08dbff53e357579266bd094cb924d9 (diff) | |
download | gdb-a5ef5cee8f062d0e83f8763214de964556dd6968.tar.gz |
* cp-valprint.c (cp_print_value): Treat the 'skip' local as
boolean. Make sure to always pass a value that matches the
contents buffer to callees. Preserve `address' for following
iterations.
* value.c (value_contents_for_printing_const): New.
(value_address): Constify value argument.
* value.h (value_contents_for_printing_const): Declare.
(value_address): Constify value argument.
Diffstat (limited to 'gdb/value.c')
-rw-r--r-- | gdb/value.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gdb/value.c b/gdb/value.c index db83ea2cada..e26270c98a4 100644 --- a/gdb/value.c +++ b/gdb/value.c @@ -435,6 +435,13 @@ value_contents_for_printing (struct value *value) } const gdb_byte * +value_contents_for_printing_const (const struct value *value) +{ + gdb_assert (!value->lazy); + return value->contents; +} + +const gdb_byte * value_contents_all (struct value *value) { const gdb_byte *result = value_contents_for_printing (value); @@ -596,7 +603,7 @@ deprecated_value_lval_hack (struct value *value) } CORE_ADDR -value_address (struct value *value) +value_address (const struct value *value) { if (value->lval == lval_internalvar || value->lval == lval_internalvar_component) |