aboutsummaryrefslogtreecommitdiff
path: root/gdb/breakpoint.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2012-06-05 19:50:50 +0000
committerPedro Alves <palves@redhat.com>2012-06-05 19:50:50 +0000
commit8556afb4f53f99b32e75285a7eb3839e0b6911ee (patch)
tree030a5b9fee25f396c3263a2cd6f4298f99d59334 /gdb/breakpoint.c
parent91cc9324e0bda6b53a4ccd548cc87f98d4b31a2d (diff)
downloadgdb-8556afb4f53f99b32e75285a7eb3839e0b6911ee.zip
gdb-8556afb4f53f99b32e75285a7eb3839e0b6911ee.tar.gz
gdb-8556afb4f53f99b32e75285a7eb3839e0b6911ee.tar.bz2
2012-06-05 Pedro Alves <palves@redhat.com>
PR backtrace/13866 * breakpoint.c (until_break_command): Only fetch the selected frame after decode_line_1.
Diffstat (limited to 'gdb/breakpoint.c')
-rw-r--r--gdb/breakpoint.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/gdb/breakpoint.c b/gdb/breakpoint.c
index 5cc1f64..12db39b 100644
--- a/gdb/breakpoint.c
+++ b/gdb/breakpoint.c
@@ -10815,10 +10815,10 @@ until_break_command (char *arg, int from_tty, int anywhere)
{
struct symtabs_and_lines sals;
struct symtab_and_line sal;
- struct frame_info *frame = get_selected_frame (NULL);
- struct gdbarch *frame_gdbarch = get_frame_arch (frame);
- struct frame_id stack_frame_id = get_stack_frame_id (frame);
- struct frame_id caller_frame_id = frame_unwind_caller_id (frame);
+ struct frame_info *frame;
+ struct gdbarch *frame_gdbarch;
+ struct frame_id stack_frame_id;
+ struct frame_id caller_frame_id;
struct breakpoint *breakpoint;
struct breakpoint *breakpoint2 = NULL;
struct cleanup *old_chain;
@@ -10854,8 +10854,15 @@ until_break_command (char *arg, int from_tty, int anywhere)
old_chain = make_cleanup (null_cleanup, NULL);
- /* Installing a breakpoint invalidates the frame chain (as it may
- need to switch threads), so do any frame handling first. */
+ /* Note linespec handling above invalidates the frame chain.
+ Installing a breakpoint also invalidates the frame chain (as it
+ may need to switch threads), so do any frame handling before
+ that. */
+
+ frame = get_selected_frame (NULL);
+ frame_gdbarch = get_frame_arch (frame);
+ stack_frame_id = get_stack_frame_id (frame);
+ caller_frame_id = frame_unwind_caller_id (frame);
/* Keep within the current frame, or in frames called by the current
one. */