This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Questionable breakpoint stepping code
- From: Jim Blandy <jimb at codesourcery dot com>
- To: Vladimir Prus <ghost at cs dot msu dot su>
- Cc: Michael Snyder <msnyder at specifix dot com>, gdb at sources dot redhat dot com
- Date: Wed, 16 Jan 2008 17:13:21 -0800
- Subject: Re: Questionable breakpoint stepping code
- References: <fi6m64$qav$1@ger.gmane.org> <200711291535.36950.vladimir@codesourcery.com> <20071130011413.GA10585@adacore.com> <200711301448.04323.vladimir@codesourcery.com> <E1J2qbz-00077Y-3r@zigzag.lvk.cs.msu.su>
Vladimir Prus <ghost at cs.msu.su> writes:
> I wonder if you've missed the below email. Can you
> tell what you think?
Hi, Vlad. This change looks fine to me; please commit.
>
> Thanks,
> Volodya
>
>> On Friday 30 November 2007 04:14:13 Joel Brobecker wrote:
>>> > > I have been away for a week and I still a bit overwhelmed by my email
>>> > > backlog that caused me to miss the patch. But if Volodya sends me the
>>> > > patch again, I'll give it a whirl.
>>> >
>>> > Thanks Joel!
>>> > Here's the patch.
>>>
>>> Thanks. I don't know why, but somehow, the patch didn't apply cleanly
>>> to HEAD, so I applied it manually. The results were identical after
>>> applying and I double-checked that the error never triggered.
>>
>> Thanks. Michael, do you have any objections to me checking that
>> patch in (included before for convenience).
>>
>> - Volodya
>>
>>
>> * infrun.c (handle_inferior_event): If
>> we failed to remove breakpoints, error,
>> don't try to increment PC by hand.
>> ---
>> gdb/infrun.c | 19 +------------------
>> 1 files changed, 1 insertions(+), 18 deletions(-)
>>
>> diff --git a/gdb/infrun.c b/gdb/infrun.c
>> index ad1de6b..b92d0de 100644
>> --- a/gdb/infrun.c
>> +++ b/gdb/infrun.c
>> @@ -1745,24 +1745,7 @@ handle_inferior_event (struct
>> execution_control_state *ecs)
>> process until the child exits (well, okay, not
>> then either :-) or execs. */
>> if (remove_status != 0)
>> - {
>> - /* FIXME! This is obviously non-portable! */
>> - write_pc_pid (stop_pc + 4, ecs->ptid);
>> - /* We need to restart all the threads now,
>> - * unles we're running in scheduler-locked mode.
>> - * Use currently_stepping to determine whether to
>> - * step or continue.
>> - */
>> - /* FIXME MVS: is there any reason not to call resume()? */
>> - if (scheduler_mode == schedlock_on)
>> - target_resume (ecs->ptid,
>> - currently_stepping (ecs), TARGET_SIGNAL_0);
>> - else
>> - target_resume (RESUME_ALL,
>> - currently_stepping (ecs), TARGET_SIGNAL_0);
>> - prepare_to_wait (ecs);
>> - return;
>> - }
>> + error (_("Cannot step over breakpoint hit in wrong thread"));
>> else
>> { /* Single step */
>> if (!ptid_equal (inferior_ptid, ecs->ptid))