From: Joel Brobecker <brobecker@adacore.com>
To: Michael Snyder <msnyder@vmware.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>,
Daniel Jacobowitz <drow@false.org>,
Pedro Alves <pedro@codesourcery.com>,
teawater <teawater@gmail.com>
Subject: Re: [RFA] Reverse Debugging, 3/5
Date: Mon, 06 Oct 2008 21:22:00 -0000 [thread overview]
Message-ID: <20081006212132.GB21853@adacore.com> (raw)
In-Reply-To: <48E3CD0B.8020003@vmware.com>
I had some comments, too, but Pedro made most of them. Here are mine
that don't overlap with his...
> + /* OK, we're just gonna keep stepping here. */
I would prefer if we kept slang out of the comments. Can we use
"going to" instead?
> + if (stop_func_sal.pc == stop_pc)
> + {
> + /* We're there already. Just stop stepping now. */
> + ecs->event_thread->stop_step = 1;
> + print_stop_reason (END_STEPPING_RANGE, 0);
> + stop_stepping (ecs);
> + return;
> + }
> + /* Else just reset the step range and keep going.
> + No step-resume breakpoint, they don't work for
> + epilogues, which can have multiple entry paths. */
> + ecs->event_thread->step_range_start = stop_func_sal.pc;
> + ecs->event_thread->step_range_end = stop_func_sal.end;
> + keep_going (ecs);
> + return;
> + }
Regarding this hunk, it really took me a long time to understand
what we're supposed to do when execution is reverse. I think it
was a combination of the function name together with the fact that
we're not trying to undo what the function does, but instead implement
whatever command the user has issued which caused us to call this
function. I am thinking, for the sake of clarity, to implement this
in a separate function and call the appropriate function from
handle_inferior_event. The function name can then be used to explain
at a glance what it's supposed to do...
--
Joel
next prev parent reply other threads:[~2008-10-06 21:22 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-01 19:20 Michael Snyder
2008-10-06 20:09 ` Pedro Alves
2008-10-06 20:54 ` Michael Snyder
2008-10-06 21:14 ` Pedro Alves
2008-10-06 21:22 ` Michael Snyder
2008-10-06 21:26 ` Joel Brobecker
2008-10-06 21:47 ` Michael Snyder
2008-10-06 21:22 ` Joel Brobecker [this message]
[not found] ` <48EA83AD.9040004@vmware.com>
2008-10-06 21:43 ` Joel Brobecker
2008-10-06 23:46 ` Michael Snyder
2008-10-07 4:07 ` Joel Brobecker
2008-10-07 18:46 ` Michael Snyder
2008-10-08 0:31 ` Joel Brobecker
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=20081006212132.GB21853@adacore.com \
--to=brobecker@adacore.com \
--cc=drow@false.org \
--cc=gdb-patches@sourceware.org \
--cc=msnyder@vmware.com \
--cc=pedro@codesourcery.com \
--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