aboutsummaryrefslogtreecommitdiff
path: root/gdb/c-valprint.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/c-valprint.c')
-rw-r--r--gdb/c-valprint.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c
index 9411890..8b05f8f 100644
--- a/gdb/c-valprint.c
+++ b/gdb/c-valprint.c
@@ -268,7 +268,10 @@ c_val_print (struct type *type, const gdb_byte *valaddr,
return;
}
- if (options->addressprint)
+ if (options->symbol_print)
+ want_space = print_address_demangle (options, gdbarch, addr,
+ stream, demangle);
+ else if (options->addressprint)
{
fputs_filtered (paddress (gdbarch, addr), stream);
want_space = 1;
@@ -296,7 +299,9 @@ c_val_print (struct type *type, const gdb_byte *valaddr,
struct minimal_symbol *msymbol =
lookup_minimal_symbol_by_pc (vt_address);
- if ((msymbol != NULL)
+ /* If 'symbol_print' is set, we did the work above. */
+ if (!options->symbol_print
+ && (msymbol != NULL)
&& (vt_address == SYMBOL_VALUE_ADDRESS (msymbol)))
{
if (want_space)