This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[RFA] Remove redundant resetting of stepping_past_singlestep_breakpoint
- From: dje at google dot com (Doug Evans)
- To: gdb-patches at sourceware dot org
- Date: Mon, 1 Dec 2008 20:31:54 -0800 (PST)
- Subject: [RFA] Remove redundant resetting of stepping_past_singlestep_breakpoint
Hi. While researching my prepare_to_proceed problem, I found this
in handle_inferior_event.
Just above this line:
stepping_past_singlestep_breakpoint = 0;
there's this:
if (stepping_past_singlestep_breakpoint)
{
gdb_assert (singlestep_breakpoints_inserted_p);
gdb_assert (ptid_equal (singlestep_ptid, ecs->ptid));
gdb_assert (!ptid_equal (singlestep_ptid, saved_singlestep_ptid));
stepping_past_singlestep_breakpoint = 0;
Ok to check in?
2008-12-01 Doug Evans <dje@google.com>
* infrun.c (handle_inferior_event): Remove redundant resetting of
stepping_past_singlestep_breakpoint.
Index: infrun.c
===================================================================
RCS file: /cvs/src/src/gdb/infrun.c,v
retrieving revision 1.342
diff -u -p -r1.342 infrun.c
--- infrun.c 22 Nov 2008 04:41:45 -0000 1.342
+++ infrun.c 2 Dec 2008 04:13:24 -0000
@@ -2511,8 +2525,6 @@ targets should add new threads to the th
}
}
- stepping_past_singlestep_breakpoint = 0;
-
if (!ptid_equal (deferred_step_ptid, null_ptid))
{
/* In non-stop mode, there's never a deferred_step_ptid set. */
---
Alternatively, one might prefer this patch, which still preserves the
indication that stepping_past_singlestep_breakpoint is 0 at this point
but in a clearer form (no redundancy).
2008-12-01 Doug Evans <dje@google.com>
* infrun.c (handle_inferior_event): Replace redundant resetting of
stepping_past_singlestep_breakpoint with an assert.
Index: infrun.c
===================================================================
RCS file: /cvs/src/src/gdb/infrun.c,v
retrieving revision 1.342
diff -u -p -r1.342 infrun.c
--- infrun.c 22 Nov 2008 04:41:45 -0000 1.342
+++ infrun.c 2 Dec 2008 04:20:08 -0000
@@ -2511,7 +2525,7 @@ targets should add new threads to the th
}
}
- stepping_past_singlestep_breakpoint = 0;
+ gdb_assert (stepping_past_singlestep_breakpoint == 0);
if (!ptid_equal (deferred_step_ptid, null_ptid))
{