aboutsummaryrefslogtreecommitdiff
path: root/gdb/valprint.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2012-05-18 15:27:25 +0000
committerTom Tromey <tromey@redhat.com>2012-05-18 15:27:25 +0000
commitedf0c1b7caed4e2bfb9a84fd9c226c6720da1d97 (patch)
treeb84ed8fdcc35ce9e0f882e99673ad10e625b2302 /gdb/valprint.c
parent2a0bfc8d1692df9d38f2932dc8a32f4bfea6cfb0 (diff)
downloadgdb-edf0c1b7caed4e2bfb9a84fd9c226c6720da1d97.zip
gdb-edf0c1b7caed4e2bfb9a84fd9c226c6720da1d97.tar.gz
gdb-edf0c1b7caed4e2bfb9a84fd9c226c6720da1d97.tar.bz2
* printcmd.c (print_address_demangle): Add 'opts' argument.
* p-valprint.c (pascal_val_print): Update. * jv-valprint.c (java_val_print): Update. * value.h: Update. * valprint.c (generic_val_print): Update. (print_function_pointer_address): Add 'options' argument. Remove 'addressprint' argument. Update. * m2-valprint.c (print_unpacked_pointer): Update. * gnu-v3-abi.c (print_one_vtable): Update. (gnuv3_print_method_ptr): Update. * f-valprint.c (f_val_print): Update. * cp-valprint.c (cp_print_value_fields): Update. * valprint.h (print_function_pointer_address): Update. * c-valprint.c (c_val_print): Update.
Diffstat (limited to 'gdb/valprint.c')
-rw-r--r--gdb/valprint.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/gdb/valprint.c b/gdb/valprint.c
index 25b62bc..507aeb5 100644
--- a/gdb/valprint.c
+++ b/gdb/valprint.c
@@ -384,8 +384,7 @@ generic_val_print (struct type *type, const gdb_byte *valaddr,
if (TYPE_CODE (elttype) == TYPE_CODE_FUNC)
{
/* Try to print what function it points to. */
- print_function_pointer_address (gdbarch, addr, stream,
- options->addressprint);
+ print_function_pointer_address (options, gdbarch, addr, stream);
return;
}
@@ -515,7 +514,7 @@ generic_val_print (struct type *type, const gdb_byte *valaddr,
type_print (type, "", stream, -1);
fprintf_filtered (stream, "} ");
/* Try to print what function it points to, and its address. */
- print_address_demangle (gdbarch, address, stream, demangle);
+ print_address_demangle (options, gdbarch, address, stream, demangle);
break;
case TYPE_CODE_BOOL:
@@ -1501,10 +1500,10 @@ print_char_chars (struct ui_file *stream, struct type *type,
stream STREAM. */
void
-print_function_pointer_address (struct gdbarch *gdbarch,
+print_function_pointer_address (const struct value_print_options *options,
+ struct gdbarch *gdbarch,
CORE_ADDR address,
- struct ui_file *stream,
- int addressprint)
+ struct ui_file *stream)
{
CORE_ADDR func_addr
= gdbarch_convert_from_func_ptr_addr (gdbarch, address,
@@ -1512,13 +1511,13 @@ print_function_pointer_address (struct gdbarch *gdbarch,
/* If the function pointer is represented by a description, print
the address of the description. */
- if (addressprint && func_addr != address)
+ if (options->addressprint && func_addr != address)
{
fputs_filtered ("@", stream);
fputs_filtered (paddress (gdbarch, address), stream);
fputs_filtered (": ", stream);
}
- print_address_demangle (gdbarch, func_addr, stream, demangle);
+ print_address_demangle (options, gdbarch, func_addr, stream, demangle);
}