qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "陳韋任 (Wei-Ren Chen)" <chenwj@iis.sinica.edu.tw>
To: Steven <wangwangkang@gmail.com>
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
	qemu-devel@nongnu.org,
	"陳韋任 (Wei-Ren Chen)" <chenwj@iis.sinica.edu.tw>
Subject: Re: [Qemu-devel] qemu log function to print out the registers of the guest
Date: Fri, 17 Aug 2012 18:26:59 +0800	[thread overview]
Message-ID: <20120817102659.GA67669@cs.nctu.edu.tw> (raw)
In-Reply-To: <CAMTrTqVN7SSa_qrY3rM2b9PUStf9aoDf75wTMs=-_76tkO=5oA@mail.gmail.com>

> To verify what is translation time and what is the run time, I log the
> register information before disassembling each guest code. I copied
> some results from the log file, which is generated at run time of a
> guest machine.
> 
>          EAX=00000000  EBX=00006ffc
>          IN:
>          0x00000000000f2087:  mov    $0xf5588,%eax
> 
>          EAX=000f5588  EBX=00006ffc
>          IN:
>          0x00000000000f208B:  move 0x4(%ebx)  %eax
> 
> The first instruction load eax with the value 0xf5588, so the eax at
> the second instruction is EAX=000f5588. So can I consider the memory
> address of 0x4(%ebx) as (00006ffc +  4)? I think this should be the
> run time information I need. Please correct me  if there is anything
> wrong. Thanks.

  IIRC, "-d in_asm" only give you what has been translated not executed.
Remember you said you log the register information before disassembling
each guest code? In other words, (guest) ebx might not be the value you
saw here. This is just my opinion.

Regards,
chenwj

-- 
Wei-Ren Chen (陳韋任)
Computer Systems Lab, Institute of Information Science,
Academia Sinica, Taiwan (R.O.C.)
Tel:886-2-2788-3799 #1667
Homepage: http://people.cs.nctu.edu.tw/~chenwj

  reply	other threads:[~2012-08-17 10:27 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-16  7:21 [Qemu-devel] qemu log function to print out the registers of the guest Steven
2012-08-16  8:02 ` 陳韋任 (Wei-Ren Chen)
2012-08-16 16:36   ` Steven
2012-08-16 16:54     ` Peter Maydell
2012-08-16 17:13       ` Steven
2012-08-16 17:15         ` Peter Maydell
2012-08-16 17:26           ` Steven
2012-08-16 19:31       ` Steven
2012-08-17 10:26         ` 陳韋任 (Wei-Ren Chen) [this message]
2012-08-16 17:00     ` Max Filippov
2012-08-16 17:29       ` Steven
2012-08-16 17:37         ` Max Filippov
2012-08-16 17:43           ` Max Filippov
2012-08-16 17:49             ` Steven
2012-08-16 18:31               ` Max Filippov
2012-08-16 21:18                 ` Max Filippov
2012-08-17  5:38                   ` Steven
2012-08-17  6:38                     ` Max Filippov
2012-08-16 18:51               ` Laurent Desnogues
2012-08-16 19:02                 ` Steven
2012-08-17 11:14                   ` 陳韋任 (Wei-Ren Chen)
2012-08-17 11:57                     ` Max Filippov
2012-08-19  8:33                       ` 陳韋任 (Wei-Ren Chen)
2012-08-21  5:40                       ` Steven
2012-08-21  7:18                         ` Max Filippov
     [not found]                           ` <CAMTrTqVF0EGEqC8qZHOV5RHYxq=MHYuu_X0V5va5gkyaRQWJuw@mail.gmail.com>
2012-08-25 20:41                             ` Max Filippov
2012-08-27 16:15                               ` Steven
2012-08-28  3:14                                 ` 陳韋任 (Wei-Ren Chen)
2012-08-28  3:44                                   ` Steven
2012-08-28 10:48                                 ` Max Filippov

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=20120817102659.GA67669@cs.nctu.edu.tw \
    --to=chenwj@iis.sinica.edu.tw \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=wangwangkang@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;
as well as URLs for NNTP newsgroup(s).