This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[patch] fix for PR2424
- From: Aleksandar Ristovski <aristovski at qnx dot com>
- To: gdb-patches at sourceware dot org
- Date: Wed, 05 Mar 2008 12:35:55 -0500
- Subject: [patch] fix for PR2424
Hello,
With the attached patch for testsuite and the patch itself, the PR should be fixed.
Thanks,
Aleksandar Ristovski
QNX Software Systems
Testsuite:
2008-03-05 Aleksandar Ristovski <aristovski@qnx.com>
* gdb.mi/mi-support.exp: Add "reason" to the matching pattern. This
is to support fix for PR2424.
infrun.c:
2008-03-05 Aleksandar Ristovski <aristovski@qnx.com>
* infrun.c (normal_stop) Move breakpoint_auto_delete further down
to allow printing to 'see' real reason of stop. This fixes PR 2424.
Index: gdb/testsuite/lib/mi-support.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/lib/mi-support.exp,v
retrieving revision 1.51
diff -r1.51 mi-support.exp
893c893
< -re ".*000\\*stopped,thread-id=\"$decimal\",frame=\{addr=\"$hex\",func=\"$func\",args=\(\\\[.*\\\]\|\{.*\}\),file=\".*\",fullname=\"${fullname_syntax}.*\",line=\"\[0-9\]*\"\}\r\n$mi_gdb_prompt$" {
---
> -re ".*000\\*stopped,reason=.*thread-id=\"$decimal\",frame=\{addr=\"$hex\",func=\"$func\",args=\(\\\[.*\\\]\|\{.*\}\),file=\".*\",fullname=\"${fullname_syntax}.*\",line=\"\[0-9\]*\"\}\r\n$mi_gdb_prompt$" {
Index: gdb/infrun.c
===================================================================
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 5 Mar 2008 16:08:02 -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. */
@@ -3292,6 +3287,9 @@ Further execution is probably impossible
}
done:
+ /* 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);
}