Adding some code to the QEMU used inside Android Emulator
Hi everyone,
My question might look very stupid but the answer would really help me.
I am working on Android emulator which is using QEMU. I need to print out the value of env->cp15.c13_fcse everytime the voidtlb_flush(CPUState*env,intflush_global) in exec.c is called. The problem is when compiling for other targets there is no -<cp15.c13_fcse member.
Therefore I only want to compile this for the ARM architecture (Which I assume is the target for Android Emulator).
I tried to use the following but it didn't work. Actually nothing is compiled for emulator.
#if defined(__arm__) || defined(arm) || defined(__arm__) || defined(ARM) || defined(_ARM_) || defined(WTF_CPU_ARM)
I would be grateful, if anyone can help me with this.
Cheers,
--Fardin
Quoted 11 lines · Fardin
Hi everyone,
My question might look very stupid but the answer would really help me.
I am working on Android emulator which is using QEMU. I need to print out the value of
env->cp15.c13_fcseeverytime the voidtlb_flush(CPUState *env, int flush_global)inexec.cis called. The problem is when compiling for other targets there is no -<cp15.c13_fcse member.Therefore I only want to compile this for the ARM architecture (Which I assume is the target for Android Emulator).
Do you actually need these other targets? Can you configure it to only build target-arm, i.e. configure --target-list=arm-softmmu ... ?
Quoted 5 lines
I tried to use the following but it didn't work. Actually nothing is compiled for emulator.
#if
defined(__arm__)|| defined(arm) ||defined(__arm__)|| defined(ARM) ||defined(_ARM_)||defined(WTF_CPU_ARM)
This #if is for the host compiler, and has nothing to do with the target you build for.
Signature · 2 lines
Thanks. -- Max
Since QEMU is part of android emulator, I don't know how to configure it to only compile for ARM target. Is there any way that I just add the code for ARM target? Or if anyone else has any suggestion on how to compile android emulator only for ARM.
Thanks,
FArdin
Quoted 31 lines · Max Filippov
Quoted 6 lines · Fardin
Hi everyone,
My question might look very stupid but the answer would really help me.
I am working on Android emulator which is using QEMU. I need to print out the value of
env->cp15.c13_fcseeverytime the void tlb_flush(CPUState*env,
Quoted 5 lines
int
flush_global) inexec.cis called. The problem is when compiling for other targets there is no -<cp15.c13_fcse member.Therefore I only want to compile this for the ARM architecture (Which I assume is the target for Android Emulator).
Do you actually need these other targets? Can you configure it to only build target-arm, i.e. configure --target-list=arm-softmmu ... ?
Quoted 4 lines
I tried to use the following but it didn't work. Actually nothing is compiled for emulator.
#if
defined(__arm__)|| defined(arm) ||defined(__arm__)|| defined(ARM)|| > defined(_ARM_) || defined(WTF_CPU_ARM)This #if is for the host compiler, and has nothing to do with the target you build for.
--
Thanks.
-- Max
Signature · 5 lines
Fardin Abdi [email protected] | 734 276 7856 <http://fardinabdi.gigfa.com>Ph.D. Student in Computer Science Networked Real-Time and Embedded systems Laboratory University of Illinois at Urbana-Champaign
Quoted 4 lines · Fardin Abdi
Since QEMU is part of android emulator, I don't know how to configure it to only compile for ARM target. Is there any way that I just add the code for ARM target? Or if anyone else has any suggestion on how to compile android emulator only for ARM.
You can add
#include "elf.h"
into cputlb.c and then decide based on ELF_MACHINE symbol, like
#if ELF_MACHINE == EM_ARM
Quoted 29 lines · Max Filippov
Quoted 28 lines · Fardin
Quoted 11 lines
Hi everyone,
My question might look very stupid but the answer would really help me.
I am working on Android emulator which is using QEMU. I need to print out
the value ofenv->cp15.c13_fcseeverytime the void tlb_flush(CPUState *env,
intflush_global) inexec.cis called. The problem is when compiling for other targets there is no -<cp15.c13_fcse member.Quoted 2 lines
Therefore I only want to compile this for the ARM architecture (Which I assume is the target for Android Emulator).
Do you actually need these other targets? Can you configure it to only build target-arm, i.e. configure --target-list=arm-softmmu ... ?
Quoted 6 lines
I tried to use the following but it didn't work. Actually nothing is compiled for emulator.
#if
defined(__arm__)|| defined(arm) ||defined(__arm__)|| defined(ARM)|| defined(_ARM_) || defined(WTF_CPU_ARM)This #if is for the host compiler, and has nothing to do with the target you build for.
Signature · 2 lines
Thanks. -- Max