mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-27 06:17:47 +08:00
* 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.
This commit is contained in:
@ -1,3 +1,15 @@
|
|||||||
|
2008-12-22 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
|
* 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.
|
||||||
|
|
||||||
2008-12-22 Tom Tromey <tromey@redhat.com>
|
2008-12-22 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
* python/python-value.c (valpy_length): Remove #if.
|
* python/python-value.c (valpy_length): Remove #if.
|
||||||
|
@ -566,9 +566,7 @@ info_common_command (char *comname, int from_tty)
|
|||||||
|
|
||||||
while (entry != NULL)
|
while (entry != NULL)
|
||||||
{
|
{
|
||||||
printf_filtered ("%s = ", SYMBOL_PRINT_NAME (entry->symbol));
|
print_variable_and_value (NULL, entry->symbol, fi, gdb_stdout, 0);
|
||||||
print_variable_value (entry->symbol, fi, gdb_stdout);
|
|
||||||
printf_filtered ("\n");
|
|
||||||
entry = entry->next;
|
entry = entry->next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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
|
/* 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
|
void
|
||||||
print_variable_value (struct symbol *var, struct frame_info *frame,
|
print_variable_and_value (const char *name, struct symbol *var,
|
||||||
struct ui_file *stream)
|
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;
|
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);
|
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
|
static void
|
||||||
|
13
gdb/stack.c
13
gdb/stack.c
@ -1374,12 +1374,7 @@ print_block_frame_locals (struct block *b, struct frame_info *frame,
|
|||||||
if (SYMBOL_IS_ARGUMENT (sym))
|
if (SYMBOL_IS_ARGUMENT (sym))
|
||||||
break;
|
break;
|
||||||
values_printed = 1;
|
values_printed = 1;
|
||||||
for (j = 0; j < num_tabs; j++)
|
print_variable_and_value (NULL, sym, frame, stream, 4 * num_tabs);
|
||||||
fputs_filtered ("\t", stream);
|
|
||||||
fputs_filtered (SYMBOL_PRINT_NAME (sym), stream);
|
|
||||||
fputs_filtered (" = ", stream);
|
|
||||||
print_variable_value (sym, frame, stream);
|
|
||||||
fprintf_filtered (stream, "\n");
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@ -1575,8 +1570,6 @@ print_frame_arg_vars (struct frame_info *frame, struct ui_file *stream)
|
|||||||
if (SYMBOL_IS_ARGUMENT (sym))
|
if (SYMBOL_IS_ARGUMENT (sym))
|
||||||
{
|
{
|
||||||
values_printed = 1;
|
values_printed = 1;
|
||||||
fputs_filtered (SYMBOL_PRINT_NAME (sym), stream);
|
|
||||||
fputs_filtered (" = ", stream);
|
|
||||||
|
|
||||||
/* We have to look up the symbol because arguments can have
|
/* We have to look up the symbol because arguments can have
|
||||||
two entries (one a parameter, one a local) and the one we
|
two entries (one a parameter, one a local) and the one we
|
||||||
@ -1591,8 +1584,8 @@ print_frame_arg_vars (struct frame_info *frame, struct ui_file *stream)
|
|||||||
|
|
||||||
sym2 = lookup_symbol (SYMBOL_LINKAGE_NAME (sym),
|
sym2 = lookup_symbol (SYMBOL_LINKAGE_NAME (sym),
|
||||||
b, VAR_DOMAIN, NULL);
|
b, VAR_DOMAIN, NULL);
|
||||||
print_variable_value (sym2, frame, stream);
|
print_variable_and_value (SYMBOL_PRINT_NAME (sym), sym2,
|
||||||
fprintf_filtered (stream, "\n");
|
frame, stream, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -557,9 +557,11 @@ extern int val_print_string (CORE_ADDR addr, int len, int width,
|
|||||||
struct ui_file *stream,
|
struct ui_file *stream,
|
||||||
const struct value_print_options *options);
|
const struct value_print_options *options);
|
||||||
|
|
||||||
extern void print_variable_value (struct symbol *var,
|
extern void print_variable_and_value (const char *name,
|
||||||
struct frame_info *frame,
|
struct symbol *var,
|
||||||
struct ui_file *stream);
|
struct frame_info *frame,
|
||||||
|
struct ui_file *stream,
|
||||||
|
int indent);
|
||||||
|
|
||||||
extern int check_field (struct type *, const char *);
|
extern int check_field (struct type *, const char *);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user