summaryrefslogtreecommitdiff
path: root/gdb/c-valprint.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2003-06-21 23:27:53 +0000
committerDaniel Jacobowitz <drow@false.org>2003-06-21 23:27:53 +0000
commit9e14d72114b8e40e25ac0f99fc9a5e490eba70a8 (patch)
tree2a345e915dcc884188439dfec10b4dcbd7350d1f /gdb/c-valprint.c
parenta4b8ebc89d2cbe6be8b4fe808e0d4c9ac2556a51 (diff)
downloadbinutils-gdb-9e14d72114b8e40e25ac0f99fc9a5e490eba70a8.tar.gz
* c-valprint.c (c_value_print): Add VALUE_OFFSET to the address
argument of val_print. * cp-valprint.c (cp_print_value): Don't add the offset parameter to the address argument of baseclass_offset or target_read_memory. Do add it to the argument of cp_print_value_fields.
Diffstat (limited to 'gdb/c-valprint.c')
-rw-r--r--gdb/c-valprint.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c
index 419b24770b6..4ca48a65a62 100644
--- a/gdb/c-valprint.c
+++ b/gdb/c-valprint.c
@@ -592,7 +592,8 @@ c_value_print (struct value *val, struct ui_file *stream, int format,
/* Otherwise, we end up at the return outside this "if" */
}
- return val_print (type, VALUE_CONTENTS_ALL (val), VALUE_EMBEDDED_OFFSET (val),
- VALUE_ADDRESS (val),
+ return val_print (type, VALUE_CONTENTS_ALL (val),
+ VALUE_EMBEDDED_OFFSET (val),
+ VALUE_ADDRESS (val) + VALUE_OFFSET (val),
stream, format, 1, 0, pretty);
}