* [RFA] Remove redundant resetting of stepping_past_singlestep_breakpoint
@ 2008-12-02 4:32 Doug Evans
2008-12-02 16:05 ` Pedro Alves
0 siblings, 1 reply; 2+ messages in thread
From: Doug Evans @ 2008-12-02 4:32 UTC (permalink / raw)
To: gdb-patches
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))
{
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [RFA] Remove redundant resetting of stepping_past_singlestep_breakpoint
2008-12-02 4:32 [RFA] Remove redundant resetting of stepping_past_singlestep_breakpoint Doug Evans
@ 2008-12-02 16:05 ` Pedro Alves
0 siblings, 0 replies; 2+ messages in thread
From: Pedro Alves @ 2008-12-02 16:05 UTC (permalink / raw)
To: gdb-patches; +Cc: Doug Evans
On Tuesday 02 December 2008 04:31:54, Doug Evans wrote:
> 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?
OK.
>
> 2008-12-01 Doug Evans <dje@google.com>
>
> * infrun.c (handle_inferior_event): Remove redundant resetting of
> stepping_past_singlestep_breakpoint.
Kudos for a shorter handle_inferior_event!
--
Pedro Alves
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-12-02 16:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-12-02 4:32 [RFA] Remove redundant resetting of stepping_past_singlestep_breakpoint Doug Evans
2008-12-02 16:05 ` Pedro Alves
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox