From: Pedro Alves Date: Fri, 30 Aug 2013 15:32:45 +0000 (+0000) Subject: restore_selected_frame: tweak warning. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e0162910f16c309b8bc642cfb1558babe92993f7;p=binutils-gdb.git restore_selected_frame: tweak warning. I noticed SRC_LINE has special handling within print_stack_frame (mid statement handling), so I audited all uses, and noticed the one in restore_selected_frame. I actually added this warning myself back in 2008, but reading back, I think we can do better. "reparsed frame" is probably confusing to users. Old: warning: Couldn't restore frame #2 in current thread, at reparsed frame #0 45 w = 0; (gdb) New: warning: Couldn't restore frame #2 in current thread. Bottom (innermost) frame selected: #0 foo () at foo.c:45 45 w = 0; (gdb) Tested on x86_64 Fedora 17. gdb/ 2013-08-30 Pedro Alves * thread.c (restore_selected_frame): Use SRC_AND_LOC, and change warning text. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 2b8d8eb047b..18ecb44f4d3 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2013-08-30 Pedro Alves + + * thread.c (restore_selected_frame): Use SRC_AND_LOC, and change + warning text. + 2013-08-30 Pedro Alves * bsd-kvm.c (bsd_kvm_open, bsd_kvm_proc_cmd, bsd_kvm_pcb_cmd): diff --git a/gdb/thread.c b/gdb/thread.c index 78851e462d0..52626ff0989 100644 --- a/gdb/thread.c +++ b/gdb/thread.c @@ -1077,12 +1077,12 @@ restore_selected_frame (struct frame_id a_frame_id, int frame_level) if (frame_level > 0 && !ui_out_is_mi_like_p (current_uiout)) { warning (_("Couldn't restore frame #%d in " - "current thread, at reparsed frame #0\n"), + "current thread. Bottom (innermost) frame selected:"), frame_level); /* For MI, we should probably have a notification about current frame change. But this error is not very likely, so don't bother for now. */ - print_stack_frame (get_selected_frame (NULL), 1, SRC_LINE); + print_stack_frame (get_selected_frame (NULL), 1, SRC_AND_LOC); } }