mirror of https://github.com/xemu-project/xemu.git
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>
This commit is contained in:
parent
87f6d3f630
commit
dffbe21746
|
@ -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,
|
void do_unassigned_access(target_phys_addr_t addr, int is_write, int is_exec,
|
||||||
int is_asi, int size)
|
int is_asi, int size)
|
||||||
{
|
{
|
||||||
#ifdef DEBUG_UNASSIGNED
|
|
||||||
CPUState *saved_env;
|
CPUState *saved_env;
|
||||||
|
|
||||||
/* XXX: hack to restore env in all cases, even if not called from
|
/* XXX: hack to restore env in all cases, even if not called from
|
||||||
generated code */
|
generated code */
|
||||||
saved_env = env;
|
saved_env = env;
|
||||||
env = cpu_single_env;
|
env = cpu_single_env;
|
||||||
|
|
||||||
|
#ifdef DEBUG_UNASSIGNED
|
||||||
printf("Unassigned mem access to " TARGET_FMT_plx " from " TARGET_FMT_lx
|
printf("Unassigned mem access to " TARGET_FMT_plx " from " TARGET_FMT_lx
|
||||||
"\n", addr, env->pc);
|
"\n", addr, env->pc);
|
||||||
env = saved_env;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (is_exec)
|
if (is_exec)
|
||||||
raise_exception(TT_CODE_ACCESS);
|
raise_exception(TT_CODE_ACCESS);
|
||||||
else
|
else
|
||||||
raise_exception(TT_DATA_ACCESS);
|
raise_exception(TT_DATA_ACCESS);
|
||||||
|
|
||||||
|
env = saved_env;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue