From: Michael Snyder <msnyder@vmware.com>
To: Joel Brobecker <brobecker@adacore.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, 1/5
Date: Mon, 06 Oct 2008 21:03:00 -0000 [thread overview]
Message-ID: <48EA7C75.7070703@vmware.com> (raw)
In-Reply-To: <20081006203021.GA21853@adacore.com>
Joel Brobecker wrote:
>> 2008-09-30 Michael Snyder <msnyder@vmware.com>
>> Target interface for reverse debugging.
>> * target.h (enum target_waitkind):
>> Add new wait event, TARGET_WAITKIND_NO_HISTORY.
>> (enum exec_direction_kind): New enum.
>> (struct target_ops): New methods to_set_execdir, to_get_execdir.
>> * target.c (target_get_execdir): New generic method.
>> (target_set_execdir): Ditto.
>
> One of the questions I'm asking myself is why having the get_execdir
> method? It seems that, once we have called "target_sets_execdir" and
> it hasn't returned ERROR, core GDB should know what the execution
> direction is, no? Is there a situation where a round-trip to the
> target would be necessary? Otherwise, we'll end up with the target
> code all doing the same thing, which is caching the current value
> of the same thing.
>
> One thing that crossed my mind while thinking about it is whether
> we want to make this property global to all inferiors or specific
> to each inferior. Ahem, shall we say global?
It was a design choice.
There were two choices:
1) modify target_resume (ops->to_resume), to add a direction
parameter.
2) Add a to_set_direction target method.
The first would have required modifying all existing targets,
so I chose the second.
Once you have a "set" method, it seems logical to have a
"get" method.
Making no assumptions about HOW the target sets the direction,
it seems likely that at least *some* targets will have to
remember this state locally. Whereas there is no reason
for core-gdb to have to remember the state locally, if it can
always get it from the target.
It seems a worse duplication to keep the same state information
simultaneously in the target and in the core, since now you
have to worry about them getting out of sync.
At worst, a target will need to maintain an int's worth of state
locally, and so long as we're never running two targets at the
same time, there's no synchronization issue.
next prev parent reply other threads:[~2008-10-06 21:03 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-01 19:18 Michael Snyder
2008-10-03 19:04 ` Doug Evans
2008-10-03 20:44 ` Michael Snyder
2008-10-06 20:30 ` Joel Brobecker
2008-10-06 21:03 ` Michael Snyder [this message]
2008-10-06 21:12 ` Daniel Jacobowitz
2008-10-06 21:20 ` Michael Snyder
2008-10-06 21:25 ` Daniel Jacobowitz
2008-10-06 21:46 ` Michael Snyder
2008-10-06 22:23 ` Joel Brobecker
2008-10-07 0:45 ` Michael Snyder
2008-10-07 3:49 ` Joel Brobecker
2008-10-07 18:30 ` Michael Snyder
2008-10-08 0:16 ` Joel Brobecker
2008-10-08 0:32 ` Michael Snyder
2008-10-08 0:55 ` Joel Brobecker
2008-10-08 1:46 ` Michael Snyder
2008-10-08 2:59 ` Joel Brobecker
2008-10-07 5:02 ` Daniel Jacobowitz
2008-10-06 21:45 ` Pedro Alves
2008-10-06 22:14 ` Michael Snyder
2008-10-06 22:35 ` Pedro Alves
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=48EA7C75.7070703@vmware.com \
--to=msnyder@vmware.com \
--cc=brobecker@adacore.com \
--cc=drow@false.org \
--cc=gdb-patches@sourceware.org \
--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