aboutsummaryrefslogtreecommitdiff
path: root/gdb/value.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2011-01-25 15:18:36 +0000
committerPedro Alves <palves@redhat.com>2011-01-25 15:18:36 +0000
commitde4127a3b22abd0e9e69f61f6e52b5f891050ffd (patch)
treee9c7badb2302c3e663e392770e7f01d355cb5d03 /gdb/value.c
parentee99023e123b99f55fdf9a99e54e03fea21d3882 (diff)
downloadgdb-de4127a3b22abd0e9e69f61f6e52b5f891050ffd.zip
gdb-de4127a3b22abd0e9e69f61f6e52b5f891050ffd.tar.gz
gdb-de4127a3b22abd0e9e69f61f6e52b5f891050ffd.tar.bz2
* 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.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/gdb/value.c b/gdb/value.c
index db83ea2..e26270c 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)