diff options
Diffstat (limited to 'gdb/c-valprint.c')
-rw-r--r-- | gdb/c-valprint.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c index 3bd4db2..287dc0b 100644 --- a/gdb/c-valprint.c +++ b/gdb/c-valprint.c @@ -706,8 +706,7 @@ c_value_print (struct value *val, struct ui_file *stream, type = lookup_reference_type (real_type); } /* JYG: Need to adjust pointer value. */ - /* NOTE: cagney/2005-01-02: THIS IS BOGUS. */ - value_contents_writeable (val)[0] -= top; + val = value_from_pointer (type, value_as_address (val) - top); /* Note: When we look up RTTI entries, we don't get any information on const or volatile attributes. */ |