From: Pedro Alves <pedro@codesourcery.com>
To: teawater <teawater@gmail.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>,
"Michael Snyder" <msnyder@vmware.com>
Subject: Re: [RFA] target adjust pc after break with itself
Date: Tue, 04 Nov 2008 18:32:00 -0000 [thread overview]
Message-ID: <200811041832.02519.pedro@codesourcery.com> (raw)
In-Reply-To: <daef60380811012301g336aee73w274ff053a07f48a6@mail.gmail.com>
Hi,
On Sunday 02 November 2008 06:01:29, teawater wrote:
> Hi Pedro,
>
> According to your idea, I write a patch
> "target_adjust_pc_with_itself.txt" for it. It's for the main trunk and
> 20080930 branch.
>
Could we place this in the branch only for a while and let it cook
there? There's nothing in mainline that would require this for
now, unless Michael wants to do something similar for his remote target.
Your patch will do for target record, though there are several other
places that check gdbarch_decr_pc_after_break () outside of infrun
that should be adjusted --- but no other target cares currently.
Maybe we should centralize this a bit more, so a single call would
be needed everywhere else instead
of (if !target_adjusts_pc_... && gdbarch_decr_pc...))
I'm always thinking about target remote when I add new target_ops
interfaces, because that's the case where the decoupling is as high
as it comes; with that in mind, I don't think that there'll be cases
were the gdbarch does decr_pc_after_break == 0, while the target will
want to override it to != 0; this interface is probably fine.
I'm not a native speaker as well, but "with itself" doesn't
sound right to me. How about something like:
target_adjusts_pc_after_break ()
if (target_adjusts_pc_after_break ())
return; /* ... then we don't have to. */
or
target_adjusts_pc_after_break_itself
?
> 2008-11-02 Hui Zhu <teawater@gmail.com>
>
> * target.h (target_ops): Add "to_adjust_pc_with_itself".
> Return true if target adjust pc after break with itself.
> (target_adjust_pc_with_itself): New macro.
> Call "to_adjust_pc_with_itself".
> * target.c (update_current_target): Set
> "to_adjust_pc_with_itself".
> * infrun.c (adjust_pc_after_break): If
> "target_adjust_pc_with_itself" return true, not adjust pc.
>
> To make P record support it. I make another patch
> "record_adjust_pc_with_itself.txt".
>
> 2008-11-02 Hui Zhu <teawater@gmail.com>
>
> * record.c (record_adjust_pc_with_itself): New function.
> Return true.
> (init_record_ops): Set to_adjust_pc_with_itself point to
> record_adjust_pc_with_itself.
--
Pedro Alves
next prev parent reply other threads:[~2008-11-04 18:32 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-02 6:02 teawater
2008-11-04 0:15 ` teawater
2008-11-04 18:32 ` Pedro Alves [this message]
2008-11-05 1:39 ` teawater
2008-11-05 4:57 ` 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=200811041832.02519.pedro@codesourcery.com \
--to=pedro@codesourcery.com \
--cc=gdb-patches@sourceware.org \
--cc=msnyder@vmware.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