diff options
author | Tom Tromey <tromey@redhat.com> | 2012-03-15 15:49:40 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2012-03-15 15:49:40 +0000 |
commit | cdfae53fa67f5576d6a15500bba8ea3fb7e5aa71 (patch) | |
tree | 93e79ab2a2e5a5d2acddb1b562d82b73b3c6b02d /gdb/cp-valprint.c | |
parent | de2f714807e42df981348b72164f60ea71b37543 (diff) | |
download | gdb-cdfae53fa67f5576d6a15500bba8ea3fb7e5aa71.tar.gz |
* cp-valprint.c (cp_print_value_fields): Use
print_function_pointer_address for vtable slot.
gdb/testsuite
* gdb.cp/virtfunc2.exp: Update expected output.
* gdb.cp/pr9631.exp: Update expected output.
* gdb.cp/member-ptr.exp: Update expected output.
* gdb.cp/inherit.exp (test_print_mvi_classes): Update expected
output.
* gdb.cp/casts.exp: Update expected output.
Diffstat (limited to 'gdb/cp-valprint.c')
-rw-r--r-- | gdb/cp-valprint.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gdb/cp-valprint.c b/gdb/cp-valprint.c index 169700660f0..cb85b0b18bc 100644 --- a/gdb/cp-valprint.c +++ b/gdb/cp-valprint.c @@ -358,6 +358,17 @@ cp_print_value_fields (struct type *type, struct type *real_type, v, stream, recurse + 1, options); } + else if (i == TYPE_VPTR_FIELDNO (type)) + { + CORE_ADDR addr + = extract_typed_address (valaddr + offset + + TYPE_FIELD_BITSIZE (type, i) / 8, + TYPE_FIELD_TYPE (type, i)); + + print_function_pointer_address (get_type_arch (type), + addr, stream, + options->addressprint); + } else { struct value_print_options opts = *options; |