All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrea Pellegrini <andrea.pellegrini@gmail.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Monitor Memory Accesses
Date: Wed, 18 Feb 2009 10:40:31 -0500	[thread overview]
Message-ID: <499C2BEF.6010107@gmail.com> (raw)
In-Reply-To: <761ea48b0902180526q1be52725x748c7c14b5d907de@mail.gmail.com>

Thanks Laurent,
I slightly modified the code from Vince and it worked great for my 
purpose (at least to monitor the PC).
Just a quick question:
In the file linux-user/mmap.c, which is the difference between the two 
following lines? Does the first one provide the virtual address while 
the second one is already translated in the real address?

        p = mmap(g2h(mmap_start),
                 host_len, prot, flags | MAP_FIXED, fd, host_offset);

        p = mmap(real_start ? g2h(real_start) : NULL,
                 host_len, prot, flags, fd, host_offset);

I'm just starting to work on tracking the load/store. :-)

~Andrea

Laurent Desnogues wrote:
> On Wed, Feb 18, 2009 at 2:17 PM, Andrea Pellegrini
> <andrea.pellegrini@gmail.com> wrote:
>   
>> Thanks for the quick reply!
>>
>> I obtain the instruction addresses through the function
>> static TranslationBlock *tb_find_slow(target_ulong pc,
>>                                     target_ulong cs_base,
>>                                     uint64_t flags)
>>
>> ......
>> // Andrea, let's check the pc
>>   printf("PC: 0x%x\n", pc);
>> ....
>>
>> in cpu_exec.c. So far it worked but maybe there is a better way to do it.
>>     
>
> No, it doesn't work.  Try to track the PC of a loop and you'll see
> what I mean.
>
> You should start by learning what is run-time code generation ;)
>
>   
>> Where can I find more informations about the "helper"?
>> I'm just starting working with Qemu so I'm still not 100% sure about what is
>> going on.  :-P
>>     
>
> The documentation is the source.  It's not easy to enter, but once
> you've understood the basic inner-workings, doing what you're
> after should not be very difficult.
>
>   
>> I searched in target-i386/translate.c for
>> tcg_gen_qemu_ld
>> or
>> tcg_gen_qemu_lst
>> and nothing pops up. Am I looking at the right thing?
>>     
>
> I talked about tcg_gen_qemu_ld*.
>
> Just to make it clear, I am talking of svn version of qemu.  If you're
> using 0.9.1 then it's a completely different story, and I invite you to
> take a look at Vince Weaver's work:
>
> http://www.csl.cornell.edu/~vince/projects/qemusim/
> http://www.csl.cornell.edu/~vince/projects/qemu-trace/
>
>
> Laurent
>
>
>
>   

  reply	other threads:[~2009-02-18 15:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-18 12:48 [Qemu-devel] Monitor Memory Accesses Andrea Pellegrini
2009-02-18 13:00 ` Laurent Desnogues
2009-02-18 13:17   ` Andrea Pellegrini
2009-02-18 13:26     ` Laurent Desnogues
2009-02-18 15:40       ` Andrea Pellegrini [this message]
2009-02-18 15:52         ` Laurent Desnogues
2009-02-18 16:14           ` Vince Weaver
2009-02-18 16:36             ` Andrea Pellegrini
2009-02-18 18:30               ` Vince Weaver
2009-02-18 19:04                 ` Andrea Pellegrini

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=499C2BEF.6010107@gmail.com \
    --to=andrea.pellegrini@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.