This is the mail archive of the
mailing list for the GDB project.
Re: [patch] fix for PR2424
Nick Roberts wrote:
> ...(I am not working on CDT but I was explained that
> missing "reason" is to blame, and after the patch I proposed I was told
> things now work as expected).
As expected for CDT, you mean?
I think it can be generalized as "as expected by mi-client". That's my
> @Nick: I think the breakpoint should be reported. The fact that it is
> temporary doesn't make it much different than a regular breakpoint... but
> maybe I'm missing something.
It's only a message so it's probably not that important, but when the user sees:
Breakpoint 1, main (argc=1, argv=0xbf844314) at myprog.c:95
and then looks at the breakpoint list and breakpoint 1 isn't there, he might
Well... yes... but presumably it was the user who put that breakpoint there in
the first place. And on the flip side, the message makes it more clear what
really caused inferior to stop.
Likewise for a frontend with a reason like "breakpoint-hit". Perhaps a new
one, like "temporary-breakpoint-hit", is needed.
I agree, the message in both cli and mi case can be more clear. I'm not sure,
however, how much headache would this give to existing front-ends. Maybe none
since currently in case of temporary breakpoint hit reason is missing altogether.
> + /* Delete the breakpoint we stopped at, if it wants to be deleted.
> + Delete any breakpoint that is to be deleted at the next stop. */
> + breakpoint_auto_delete (stop_bpstat);
> annotate_stopped ();
> observer_notify_normal_stop (stop_bpstat);
If anyone ever uses observer_notify_normal_stop, then presumably
breakpoint_auto_delete would need to go after that.
You are most probably right. New diff for infrun.c attached.
RCS file: /cvs/src/src/gdb/infrun.c,v
retrieving revision 1.266
diff -u -p -r1.266 infrun.c
--- gdb/infrun.c 29 Jan 2008 22:47:19 -0000 1.266
+++ gdb/infrun.c 9 Mar 2008 04:48:34 -0000
@@ -3151,11 +3151,6 @@ Further execution is probably impossible
- /* Delete the breakpoint we stopped at, if it wants to be deleted.
- Delete any breakpoint that is to be deleted at the next stop. */
- breakpoint_auto_delete (stop_bpstat);
/* If an auto-display called a function and that got a signal,
delete that auto-display to avoid an infinite recursion. */
@@ -3294,6 +3289,9 @@ Further execution is probably impossible
+ /* Delete the breakpoint we stopped at, if it wants to be deleted.
+ Delete any breakpoint that is to be deleted at the next stop. */
+ breakpoint_auto_delete (stop_bpstat);