From a5ef5cee8f062d0e83f8763214de964556dd6968 Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Tue, 25 Jan 2011 15:18:34 +0000 Subject: * 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. --- gdb/value.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'gdb/value.c') diff --git a/gdb/value.c b/gdb/value.c index db83ea2cada..e26270c98a4 100644 --- a/gdb/value.c +++ b/gdb/value.c @@ -434,6 +434,13 @@ value_contents_for_printing (struct value *value) return value->contents; } +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) { @@ -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) -- cgit v1.2.1