* 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.
This commit is contained in:
Tom Tromey
2012-03-15 15:49:42 +00:00
parent c4aeac856a
commit 410528f093
9 changed files with 33 additions and 7 deletions

View File

@@ -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;