diff options
author | Andreas Färber <afaerber@suse.de> | 2013-06-27 19:09:09 +0200 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2013-07-23 02:41:33 +0200 |
commit | f3659eee05793aede68b1791465fb2b0767bc1f2 (patch) | |
tree | 626440326fd54bc46ac8bc77750798787d388f79 /target-sparc/mmu_helper.c | |
parent | f17ec444c3d39f76bcd8b71c2c05d5754bfe333e (diff) | |
download | qemu-f3659eee05793aede68b1791465fb2b0767bc1f2.zip qemu-f3659eee05793aede68b1791465fb2b0767bc1f2.tar.gz qemu-f3659eee05793aede68b1791465fb2b0767bc1f2.tar.bz2 |
cpu: Introduce CPUClass::memory_rw_debug() for target_memory_rw_debug()
Make inline target_memory_rw_debug() always available and change its
argument to CPUState. Let it check if CPUClass::memory_rw_debug provides
a specialized callback and fall back to cpu_memory_rw_debug() otherwise.
The only overriding implementation is for 32-bit sparc.
This prepares for changing GDBState::g_cpu to CPUState.
Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'target-sparc/mmu_helper.c')
-rw-r--r-- | target-sparc/mmu_helper.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/target-sparc/mmu_helper.c b/target-sparc/mmu_helper.c index 45d08e4..ef12a0a 100644 --- a/target-sparc/mmu_helper.c +++ b/target-sparc/mmu_helper.c @@ -353,10 +353,12 @@ void dump_mmu(FILE *f, fprintf_function cpu_fprintf, CPUSPARCState *env) * reads (and only reads) in stack frames as if windows were flushed. We assume * that the sparc ABI is followed. */ -int target_memory_rw_debug(CPUSPARCState *env, target_ulong addr, - uint8_t *buf, int len, int is_write) +int sparc_cpu_memory_rw_debug(CPUState *cs, vaddr address, + uint8_t *buf, int len, bool is_write) { - CPUState *cs = CPU(sparc_env_get_cpu(env)); + SPARCCPU *cpu = SPARC_CPU(cs); + CPUSPARCState *env = &cpu->env; + target_ulong addr = address; int i; int len1; int cwp = env->cwp; |