This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[patch] Don't deinsert permanent breakpoints
- From: "John David Anglin" <dave at hiauly1 dot hia dot nrc dot ca>
- To: gdb-patches at sourceware dot org
- Date: Sun, 10 Aug 2008 16:59:11 -0400 (EDT)
- Subject: [patch] Don't deinsert permanent breakpoints
The enclosed change fixes PR 2497.
Ok?
Dave
--
J. David Anglin dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6602)
2008-08-10 John David Anglin <dave.anglin@nrc-crnc.gc.ca>
PR gdb/2497
* breakpoint.c (reattach_breakpoints): Don't remove permanent
breakpoints.
(mark_breakpoints_out, breakpoint_init_inferior): likewise.
Index: breakpoint.c
===================================================================
RCS file: /cvs/src/src/gdb/breakpoint.c,v
retrieving revision 1.340
diff -u -3 -p -r1.340 breakpoint.c
--- breakpoint.c 6 Aug 2008 10:12:34 -0000 1.340
+++ breakpoint.c 10 Aug 2008 20:24:35 -0000
@@ -1416,7 +1416,7 @@ reattach_breakpoints (int pid)
inferior_ptid = pid_to_ptid (pid);
ALL_BP_LOCATIONS (b)
{
- if (b->inserted)
+ if (b->inserted && b->owner->enable_state != bp_permanent)
{
b->inserted = 0;
val = insert_bp_location (b, tmp_error_stream,
@@ -1698,7 +1698,8 @@ mark_breakpoints_out (void)
struct bp_location *bpt;
ALL_BP_LOCATIONS (bpt)
- bpt->inserted = 0;
+ if (bpt->owner->enable_state != bp_permanent)
+ bpt->inserted = 0;
}
/* Clear the "inserted" flag in all breakpoints and delete any
@@ -1720,7 +1721,8 @@ breakpoint_init_inferior (enum inf_conte
struct bp_location *bpt;
ALL_BP_LOCATIONS (bpt)
- bpt->inserted = 0;
+ if (bpt->owner->enable_state != bp_permanent)
+ bpt->inserted = 0;
ALL_BREAKPOINTS_SAFE (b, temp)
{