Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: yao@codesourcery.com (Yao Qi)
Cc: gdb-patches@sourceware.org
Subject: Re: [try 3rd] arm_pc_is_thumb takes displaced stepping into account
Date: Tue, 15 Feb 2011 21:15:00 -0000	[thread overview]
Message-ID: <201102152107.p1FL7lt5019595@d06av02.portsmouth.uk.ibm.com> (raw)
In-Reply-To: <4D5388D6.2050901@codesourcery.com> from "Yao Qi" at Feb 10, 2011 02:42:30 PM

Yao Qi wrote:
> On 01/31/2011 11:38 PM, Ulrich Weigand wrote:
> > What if the copy area contains more than a single instruction, and we
> > need to find out the mode of the PC corresponding to the second of them?
> > 
> 
> This approach can handle multiple instructions in copy area, because
> during preparation of displaced stepping (in displaced_step_prepare),
> regcache_write_pc is called to update PC to the *address of copy area*,
> no matter how many instructions in copy area.
> 
> Per my limited knowledge on GDB, I can't find a case that PC is set
> somewhere of copy area other than the beginning of copy area during
> displaced stepping.  That is to say, we don't have to know the mode of
> the 2nd instruction.

Hmm, I guess you're right ... GDB does "hide" the fact that it has
replaced the original instruction, and you should never end up in
the middle of a displaced stepping sequence.

The patch is OK, except for a couple of formatting issues:

+  struct displaced_step_closure* dsc
+    = get_displaced_step_closure_by_addr(memaddr);

Please use
   struct displaced_step_closure *dsc
(i.e. the * next to the variable, not the type).

+struct displaced_step_closure*
+get_displaced_step_closure_by_addr (CORE_ADDR addr);

Here as well, there should be a space between the type and the *.

Also, please do not start the function name on the next line
in the header file; "grep ^get_displaced_step_closure_by_addr *"
should find only the definition, not the declaration.

Thanks,
Ulrich

-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


  reply	other threads:[~2011-02-15 21:07 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-20  7:50 [rfa] Update PC without side effect in displaced stepping Yao Qi
2010-12-20  8:06 ` Mark Kettenis
2010-12-20 13:42   ` Yao Qi
2010-12-21 16:19     ` Yao Qi
2010-12-23  4:54       ` Joel Brobecker
2010-12-23  8:45         ` Yao Qi
2011-01-06 14:19           ` [PING : rfa] " Yao Qi
2011-01-12  5:39           ` [try 3rd] arm_pc_is_thumb takes displaced stepping into account Yao Qi
2011-01-13 15:55             ` Matthew Gretton-Dann
2011-01-13 16:34               ` Yao Qi
2011-01-19 16:09             ` [Ping 1: try " Yao Qi
2011-01-30  3:21               ` [Ping 2: " Yao Qi
2011-01-31 15:40             ` [try " Ulrich Weigand
2011-02-10  6:42               ` Yao Qi
2011-02-15 21:15                 ` Ulrich Weigand [this message]
2010-12-23 12:04         ` [rfa] Update PC without side effect in displaced stepping Mark Kettenis

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=201102152107.p1FL7lt5019595@d06av02.portsmouth.uk.ibm.com \
    --to=uweigand@de.ibm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=yao@codesourcery.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