From: "Alex Bennée" <alex.bennee@linaro.org>
To: Rafael Kioji <rafaelkioji@gmail.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Translation block identification.
Date: Tue, 01 May 2018 11:04:49 +0100 [thread overview]
Message-ID: <87vac7adz2.fsf@linaro.org> (raw)
In-Reply-To: <1fa7369f-9c6d-73c6-77e1-7911a9538d82@gmail.com>
Rafael Kioji <rafaelkioji@gmail.com> writes:
> Dear all,
>
> During translation how can I identify what is the basic block of the
> guest code? I wanted to know whether the block being translated is the
> beginning of a function and get its name.
>
> My current approach involves looking up the symbol associated with the
> first PC of the translation block. But no symbol is ever found. What I
> did was to add the following code in the function "translator_loop" at
> "accel/tcg/translator.c":
>
> printf("sym: %lu %s\n", tb->pc, lookup_symbol(tb->pc));
>
> The function lookup_symbol is defined in the file "./disas.c". I am
> compiling my application with symbols (-g). My target arch is ARM.
If you run QEMU with the debug flags you should see name resolution for
each basic block. e.g.
qemu-arm -d in_asm prog
--
Alex Bennée
next prev parent reply other threads:[~2018-05-01 10:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-01 9:28 [Qemu-devel] Translation block identification Rafael Kioji
2018-05-01 10:04 ` Alex Bennée [this message]
2018-05-01 10:20 ` Rafael Kioji
2018-05-01 10:28 ` Peter Maydell
2018-05-01 10:47 ` Rafael Kioji
2018-05-01 10:43 ` Alex Bennée
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=87vac7adz2.fsf@linaro.org \
--to=alex.bennee@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=rafaelkioji@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).