diff options
author | Tom Tromey <tromey@redhat.com> | 2008-12-22 23:11:56 +0000 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2008-12-22 23:11:56 +0000 |
commit | aad95b57c5c4f5f11bd45e848a3ff3bafff1bfc5 (patch) | |
tree | 0c907e97881028948a90872f193ed997e014853b /gdb/printcmd.c | |
parent | 1446eb676faa451b31f37766f758d2c7df1ac26e (diff) | |
download | gdb-aad95b57c5c4f5f11bd45e848a3ff3bafff1bfc5.zip gdb-aad95b57c5c4f5f11bd45e848a3ff3bafff1bfc5.tar.gz gdb-aad95b57c5c4f5f11bd45e848a3ff3bafff1bfc5.tar.bz2 |
* stack.c (print_block_frame_locals): Print spaces, not tabs.
Update for call to print_variable_and_value.
(print_frame_arg_vars): Update.
* value.h (print_variable_and_value): Rename from
print_variable_value. Add 'name' and 'indent' parameters.
* printcmd.c (print_variable_and_value): Rename from
print_variable_value. Add 'name' and 'indent' parameters. Use
common_val_print.
* f-valprint.c (info_common_command): Update.
Diffstat (limited to 'gdb/printcmd.c')
-rw-r--r-- | gdb/printcmd.c | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/gdb/printcmd.c b/gdb/printcmd.c index 6d6b915..c4262d5 100644 --- a/gdb/printcmd.c +++ b/gdb/printcmd.c @@ -1731,17 +1731,28 @@ disable_display_command (char *args, int from_tty) /* Print the value in stack frame FRAME of a variable specified by a - struct symbol. */ + struct symbol. NAME is the name to print; if NULL then VAR's print + name will be used. STREAM is the ui_file on which to print the + value. INDENT specifies the number of indent levels to print + before printing the variable name. */ void -print_variable_value (struct symbol *var, struct frame_info *frame, - struct ui_file *stream) +print_variable_and_value (const char *name, struct symbol *var, + struct frame_info *frame, + struct ui_file *stream, int indent) { - struct value *val = read_var_value (var, frame); + struct value *val; struct value_print_options opts; + if (!name) + name = SYMBOL_PRINT_NAME (var); + + fprintf_filtered (stream, "%s%s = ", n_spaces (2 * indent), name); + + val = read_var_value (var, frame); get_user_print_options (&opts); - value_print (val, stream, &opts); + common_val_print (val, stream, indent, &opts, current_language); + fprintf_filtered (stream, "\n"); } static void |