This is the mail archive of the
gdb@sourceware.cygnus.com
mailing list for the GDB project.
patch to make 'until location' work better.
- To: gdb@sourceware.cygnus.com (GDB Developers)
- Subject: patch to make 'until location' work better.
- From: toddpw@wrs.com (Todd Whitesel)
- Date: Mon, 10 May 1999 17:21:30 -0700 (PDT)
[ note, I don't have much experience submitting patches so hints are welcome. ]
This fixes a bug in the until command when its argument is a location in a
function other than the one of the selected frame. Apparently there is already
a testsuite test for this, because when I re-ran the testsuite, I got 95 FAILs
instead of 96.
1999-05-10 Todd Whitesel <toddpw@wrs.com>
* breakpoint.c (until_break_command): When location is not in the same
function as selected_frame, don't qualify its breakpoint with a frame.
#!/bin/sh
patch -b -c -p 0 <<':END:PATCH:HUNKS:'
Index: breakpoint.c
diff -c breakpoint.c.orig breakpoint.c
*** breakpoint.c.orig Mon May 10 16:36:43 1999
--- breakpoint.c Mon May 10 16:39:21 1999
***************
*** 4485,4490 ****
--- 4485,4491 ----
struct symtabs_and_lines sals;
struct symtab_and_line sal;
struct frame_info *prev_frame = get_prev_frame (selected_frame);
+ struct frame_info *fi;
struct breakpoint *breakpoint;
struct cleanup *old_chain;
***************
*** 4510,4516 ****
resolve_sal_pc (&sal);
! breakpoint = set_momentary_breakpoint (sal, selected_frame, bp_until);
old_chain = make_cleanup ((make_cleanup_func) delete_breakpoint, breakpoint);
--- 4511,4525 ----
resolve_sal_pc (&sal);
! /* If the 'until' breakpoint is within the same function as the selected
! frame, then it should only stop when it does so in the selected frame.
! Otherwise it should always stop. Previously if you tried to 'until' a
! destination outside the selected frame's function, the breakpoint was
! quietly ignored by the bpstat logic, because the frame was never right! */
! fi = selected_frame;
! if (fi && find_pc_function (fi->pc) != find_pc_function (sal.pc))
! fi = NULL;
! breakpoint = set_momentary_breakpoint (sal, fi, bp_until);
old_chain = make_cleanup ((make_cleanup_func) delete_breakpoint, breakpoint);
:END:PATCH:HUNKS:
# eof
--
Todd Whitesel
toddpw @ wrs.com