Maybe I'm not specific enough. I built Android from the source code and I know that the Android Emulator that comes with it, is based on QEMU. I don't want anything from Android. What I'm interested in is the underlying QEMU. I want to see how the program counter changes during translation. To my understanding, in the file target-arm/translate.c there are cases, each one for a different ARM instruction to be translated (write, store, branch etc.). I also know that for optimization purposes, the program counter changes only after a branch instruction. So, if and when I print the program counter, I expect to see it change only after a "branch" and remain unchanged after any other instruction. To sum up, I want to add printf()s to the source code of QEMU beneath the Android Emulator to see how the program counter behaves. I'm asking how do I do that. How do I recompile the source? How and where do I see the printed information? Please, it's very important.
2014-02-04 Andreas Färber <afaer...@suse.de>: > Hi, > > Am 03.02.2014 18:45, schrieb Marinos Tsantekidis: > > Hi to all! I'm looking to extract some info from QEMU used by Android > > Emulator. I want to add some printf s to the source code. How do I do > > that? How do I recompile the source in order for the changes to take > > effect? Please help!! > > Please see our Wiki for info on compiling QEMU: > > http://wiki.qemu.org/Documentation/GettingStartedDevelopers > > Adding printf()s to device emulation code is trivial and works like in > any other C code. For instruction-level tracing it's less easy, you can > only add printf()s during translation time, but not generally for > execution tracing. > > If you want information specifically on the Android emulator, you'll > have to ask elsewhere since we don't maintain that. > > Regards, > Andreas > > -- > SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany > GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg >