From: Michael Snyder <msnyder@vmware.com>
To: teawater <teawater@gmail.com>
Cc: Joel Brobecker <brobecker@adacore.com>,
Daniel Jacobowitz <drow@false.org>,
"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [reverse RFA] no singlestep-over-BP in reverse
Date: Wed, 17 Sep 2008 18:18:00 -0000 [thread overview]
Message-ID: <48D1494D.4070306@vmware.com> (raw)
In-Reply-To: <daef60380809170843m3064f26ckaad87cb667df454a@mail.gmail.com>
Committed to branch.
teawater wrote:
> Looks good. Please check it in.
>
> And I think we have decided the how to deal with breakpoint.
>
> On Wed, Sep 17, 2008 at 08:54, Michael Snyder <msnyder@vmware.com> wrote:
>> Joel Brobecker wrote:
>>>> And I believe that consistent behavior / semantics should be:
>>>>
>>>> If you tell me that you are stopped at instruction 1000,
>>>> regardless of whether you were going forward or backward
>>>> when you got there, then I will expect that if I tell you
>>>> to execute forward, you will execute the instruction at
>>>> 1000.
>>> This makes total sense to me. I think I would be very confused
>>> by the debugger if I started going back and forth with a debugger
>>> that didn't follow the semantics above.
>> Thanks. By the way I've revised this patch slightly,
>> as shown below. Use "== reverse" instead of "!= forward".
>>
>> Makes it do the right thing in the "unknown" case.
>>
>>
>> 2008-09-15 Michael Snyder <msnyder@vmware.com>
>>
>> * infrun.c (proceed): No need to singlestep over a breakpoint
>> when resuming in reverse.
>>
>> Index: infrun.c
>> ===================================================================
>> RCS file: /cvs/src/src/gdb/infrun.c,v
>> retrieving revision 1.300.2.5
>> diff -u -p -r1.300.2.5 infrun.c
>> --- infrun.c 5 Sep 2008 03:37:10 -0000 1.300.2.5
>> +++ infrun.c 17 Sep 2008 00:54:00 -0000
>> @@ -1226,11 +1226,17 @@ proceed (CORE_ADDR addr, enum target_sig
>>
>> if (addr == (CORE_ADDR) -1)
>> {
>> - if (pc == stop_pc && breakpoint_here_p (pc))
>> + if (pc == stop_pc && breakpoint_here_p (pc)
>> + && target_get_execution_direction () != EXEC_REVERSE)
>> /* There is a breakpoint at the address we will resume at,
>> step one instruction before inserting breakpoints so that
>> we do not stop right away (and report a second hit at this
>> - breakpoint). */
>> + breakpoint).
>> +
>> + Note, we don't do this in reverse, because we won't
>> + actually be executing the breakpoint insn anyway.
>> + We'll be (un-)executing the previous instruction. */
>> +
>> oneproc = 1;
>> else if (gdbarch_single_step_through_delay_p (gdbarch)
>> && gdbarch_single_step_through_delay (gdbarch,
>>
>>
next prev parent reply other threads:[~2008-09-17 18:18 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-15 18:33 Michael Snyder
2008-09-15 18:43 ` Daniel Jacobowitz
2008-09-15 19:07 ` Michael Snyder
2008-09-15 21:15 ` Daniel Jacobowitz
2008-09-15 23:09 ` Michael Snyder
2008-09-16 0:09 ` Michael Snyder
2008-09-16 4:13 ` teawater
[not found] ` <daef60380809152110u663350abx76b283d519c5a09d@mail.gmail.com>
2008-09-16 18:40 ` Michael Snyder
2008-09-16 4:22 ` teawater
2008-09-16 15:04 ` teawater
2008-09-16 15:14 ` teawater
2008-09-16 15:22 ` Daniel Jacobowitz
2008-09-16 15:34 ` teawater
2008-09-16 15:35 ` teawater
2008-09-16 18:50 ` Michael Snyder
2008-09-16 18:45 ` Michael Snyder
2008-09-16 20:11 ` Joel Brobecker
2008-09-17 0:56 ` Michael Snyder
2008-09-17 15:44 ` teawater
2008-09-17 18:18 ` Michael Snyder [this message]
2008-09-17 15:32 ` teawater
2008-09-17 18:16 ` Michael Snyder
2008-09-18 6:39 ` teawater
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=48D1494D.4070306@vmware.com \
--to=msnyder@vmware.com \
--cc=brobecker@adacore.com \
--cc=drow@false.org \
--cc=gdb-patches@sourceware.org \
--cc=teawater@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox