aboutsummaryrefslogtreecommitdiff
path: root/gdb/f-valprint.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2012-07-16 19:15:39 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2012-07-16 19:15:39 +0000
commit8f04399994587ef7931511d18d72526de3f6f2b3 (patch)
tree919facc060422aa198d79463c40c02b44f04fdbe /gdb/f-valprint.c
parentae5e0686eef580b284df2f764cf29b38ee41b675 (diff)
downloadgdb-8f04399994587ef7931511d18d72526de3f6f2b3.zip
gdb-8f04399994587ef7931511d18d72526de3f6f2b3.tar.gz
gdb-8f04399994587ef7931511d18d72526de3f6f2b3.tar.bz2
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/f-valprint.c')
-rw-r--r--gdb/f-valprint.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/gdb/f-valprint.c b/gdb/f-valprint.c
index 8b84b5a..4359f6f 100644
--- a/gdb/f-valprint.c
+++ b/gdb/f-valprint.c
@@ -505,6 +505,8 @@ info_common_command (char *comname, int from_tty)
if (the_common)
{
+ struct frame_id frame_id = get_frame_id (fi);
+
if (strcmp (comname, BLANK_COMMON_NAME_LOCAL) == 0)
printf_filtered (_("Contents of blank COMMON block:\n"));
else
@@ -515,7 +517,18 @@ info_common_command (char *comname, int from_tty)
while (entry != NULL)
{
+ fi = frame_find_by_id (frame_id);
+ if (fi == NULL)
+ {
+ warning (_("Unable to restore previously selected frame."));
+ break;
+ }
+
print_variable_and_value (NULL, entry->symbol, fi, gdb_stdout, 0);
+
+ /* print_variable_and_value invalidates FI. */
+ fi = NULL;
+
entry = entry->next;
}
}