From: Steven <wangwangkang@gmail.com>
To: Max Filippov <jcmvbkbc@gmail.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] qemu log function to print out the registers of the guest
Date: Thu, 16 Aug 2012 13:29:24 -0400 [thread overview]
Message-ID: <CAMTrTqXYeLyGdUsarxBEB03e1_WHgAn-40emJ0cz5sLWv6YT0A@mail.gmail.com> (raw)
In-Reply-To: <CAMo8Bf+BPuhyr4OtDGqfXcxpjFo-VnCn0qrmGo0Rob4980q+Jw@mail.gmail.com>
On Thu, Aug 16, 2012 at 1:00 PM, Max Filippov <jcmvbkbc@gmail.com> wrote:
> On Thu, Aug 16, 2012 at 8:36 PM, Steven <wangwangkang@gmail.com> wrote:
>> On Thu, Aug 16, 2012 at 4:02 AM, 陳韋任 (Wei-Ren Chen)
>> <chenwj@iis.sinica.edu.tw> wrote:
>>>> I would like to is there any function that could log the register
>>>> content of the guest machine, like "info registers" in the qemu
>>>> monitor mode.
>>>
>>> Why not check how "info registes" be implemented in QEMU? ;)
>>> I guess you just have to log env->regs or something like that.
>> Thanks for pointing this out.
>> I would like to get a trace of guest memory access. So I can not use
>> "info registers".
>> What I want to do is that when tcg fetches a load instruction at
>> disas_insns(), the guest memory address should be calculated. For
>
> No, you don't want this, because the same translated code may be
> invoked multiple times with different values in registers.
>
>> example, the tb has an instruction of mov 0x4(%ebx) %eax.
>> To calculate the address of 0x4(%ebx), I need to know the value of %ebx.
>> Is this correct? Thanks.
>
> Why don't you just instrument actual memory access functions in
> softmmu_template.h ?
But this code only touches the s->pc. For registers in the load
instruction, it won't generate the memory access code. So I need to
add code to some function to get the guest memory address access.
>
> --
> Thanks.
> -- Max
next prev parent reply other threads:[~2012-08-16 17:29 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)
2012-08-16 17:00 ` Max Filippov
2012-08-16 17:29 ` Steven [this message]
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=CAMTrTqXYeLyGdUsarxBEB03e1_WHgAn-40emJ0cz5sLWv6YT0A@mail.gmail.com \
--to=wangwangkang@gmail.com \
--cc=jcmvbkbc@gmail.com \
--cc=qemu-devel@nongnu.org \
/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).