qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Finding first TranslationBlock in user mode emulation


From: Peter Maydell
Subject: Re: [Qemu-devel] Finding first TranslationBlock in user mode emulation
Date: Fri, 5 Apr 2013 15:15:42 +0100

On 5 April 2013 15:06, Ivan Jovanovic <address@hidden> wrote:
> When I examine in_asm and out_asm logs I notice that before my program
> starts emulating, dynamic linker code is being emulated, which is, of
> course, expected.
>
> My question is, is there a way in qemu (a flag or something similar) to
> determine during emulation when the dl code finishes executing and execution
> of the first TranslationBlock of my code starts?

No, because QEMU doesn't care what your program does -- it just
emulates code and doesn't need to know whether it is in the
dynamic linker or the main program binary or a shared library
or even code your program has dynamically generated at runtime.

I suggest you look at the symbols for your guest binary (with
'nm' or 'objdump', for example) and match up the addresses in
them with your code. (In particular this should let you find out
which TB corresponds to the main() function.) You can either do
this by hand or you could probably write a script to annotate
the logs for you.

-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]