summaryrefslogtreecommitdiff
path: root/gdb/printcmd.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2012-07-16 19:15:35 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2012-07-16 19:15:35 +0000
commit10f121e6da0388675557d2882790971bf8a6d6e5 (patch)
tree8f935aa00b56eed2b5c205b6a1bd9d865e0c4186 /gdb/printcmd.c
parenta4127fbd742128ef4046eaa9ef15feb1816c8e20 (diff)
downloadgdb-10f121e6da0388675557d2882790971bf8a6d6e5.tar.gz
gdb/
PR 11914 * f-valprint.c (info_common_command): New variable frame_id. Reinitialize FI form FRAME_ID after each print_variable_and_value. * printcmd.c (print_variable_and_value): Extend function comment. Add comment for invalidated FRAME. * stack.c (backtrace_command_1): New variable frame_id. Reinitialize FI form FRAME_ID after each print_frame_local_vars. (struct print_variable_and_value_data): Change frame to frame_id. (do_print_variable_and_value): New variable frame, initialize it from p->frame_id. Add comment for invalidated FRAME. (print_frame_local_vars, print_frame_arg_vars): New function comment. Update CB_DATA.FRAME to CB_DATA.FRAME_ID initialization. Add comment for invalidated FRAME. gdb/testsuite/ PR 11914 * gdb.python/py-prettyprint.c (eval_func, eval_sub): New. (main): Call eval_sub. * gdb.python/py-prettyprint.exp: (python execfile ('py-prettyprint.py')): Move it earlier. New breakpoint for eval-break. (continue to breakpoint: eval-break, info locals): New test. (python execfile ('py-prettyprint.py')): Move it from here. * gdb.python/py-prettyprint.py (class pp_eval_type): New. (register_pretty_printers): Register pp_eval_type.
Diffstat (limited to 'gdb/printcmd.c')
-rw-r--r--gdb/printcmd.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gdb/printcmd.c b/gdb/printcmd.c
index 2a0a8861cd4..d5b5b63122a 100644
--- a/gdb/printcmd.c
+++ b/gdb/printcmd.c
@@ -1961,7 +1961,9 @@ clear_dangling_display_expressions (struct so_list *solib)
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. */
+ before printing the variable name.
+
+ This function invalidates FRAME. */
void
print_variable_and_value (const char *name, struct symbol *var,
@@ -1983,6 +1985,10 @@ print_variable_and_value (const char *name, struct symbol *var,
get_user_print_options (&opts);
opts.deref_ref = 1;
common_val_print (val, stream, indent, &opts, current_language);
+
+ /* common_val_print invalidates FRAME when a pretty printer calls inferior
+ function. */
+ frame = NULL;
}
if (except.reason < 0)
fprintf_filtered(stream, "<error reading variable %s (%s)>", name,