diff options
author | Igor V. Kovalenko | 2010-01-03 13:09:27 +0100 |
---|---|---|
committer | Blue Swirl | 2010-01-03 13:19:20 +0100 |
commit | dffbe21746fc7a8b66fbbdf15f74eefccd8edafd (patch) | |
tree | 911765f4f97c646bf0784122dc9caf39e98603c5 | |
parent | sparc64: switch to MMU global registers in more MMU related traps (diff) | |
download | qemu-dffbe21746fc7a8b66fbbdf15f74eefccd8edafd.tar.gz qemu-dffbe21746fc7a8b66fbbdf15f74eefccd8edafd.tar.xz qemu-dffbe21746fc7a8b66fbbdf15f74eefccd8edafd.zip |
pass env to raise_exception if called outside of op_helper code
- this fixes stepping with gdb, where do_unassigned_access
may be called from gdb handler, outside of generated code
Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
-rw-r--r-- | target-sparc/op_helper.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/target-sparc/op_helper.c b/target-sparc/op_helper.c index c849343ee2..dab2c25a2b 100644 --- a/target-sparc/op_helper.c +++ b/target-sparc/op_helper.c @@ -3686,21 +3686,24 @@ void do_unassigned_access(target_phys_addr_t addr, int is_write, int is_exec, void do_unassigned_access(target_phys_addr_t addr, int is_write, int is_exec, int is_asi, int size) { -#ifdef DEBUG_UNASSIGNED CPUState *saved_env; /* XXX: hack to restore env in all cases, even if not called from generated code */ saved_env = env; env = cpu_single_env; + +#ifdef DEBUG_UNASSIGNED printf("Unassigned mem access to " TARGET_FMT_plx " from " TARGET_FMT_lx "\n", addr, env->pc); - env = saved_env; #endif + if (is_exec) raise_exception(TT_CODE_ACCESS); else raise_exception(TT_DATA_ACCESS); + + env = saved_env; } #endif |