diff options
Diffstat (limited to 'gdb/cp-valprint.c')
-rw-r--r-- | gdb/cp-valprint.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gdb/cp-valprint.c b/gdb/cp-valprint.c index 8b7d868e..181b4ff 100644 --- a/gdb/cp-valprint.c +++ b/gdb/cp-valprint.c @@ -461,6 +461,7 @@ cp_print_static_field (struct type *type, if (TYPE_CODE (type) == TYPE_CODE_STRUCT) { CORE_ADDR *first_dont_print; + CORE_ADDR addr; int i; first_dont_print @@ -470,7 +471,7 @@ cp_print_static_field (struct type *type, while (--i >= 0) { - if (VALUE_ADDRESS (val) == first_dont_print[i]) + if (value_address (val) == first_dont_print[i]) { fputs_filtered ("<same as static member of an already" " seen type>", @@ -479,12 +480,13 @@ cp_print_static_field (struct type *type, } } - obstack_grow (&dont_print_statmem_obstack, (char *) &VALUE_ADDRESS (val), + addr = value_address (val); + obstack_grow (&dont_print_statmem_obstack, (char *) &addr, sizeof (CORE_ADDR)); CHECK_TYPEDEF (type); cp_print_value_fields (type, type, value_contents_all (val), - value_embedded_offset (val), VALUE_ADDRESS (val), + value_embedded_offset (val), addr, stream, recurse, options, NULL, 1); return; } @@ -492,7 +494,7 @@ cp_print_static_field (struct type *type, opts = *options; opts.deref_ref = 0; val_print (type, value_contents_all (val), - value_embedded_offset (val), VALUE_ADDRESS (val), + value_embedded_offset (val), value_address (val), stream, recurse, &opts, current_language); } |