summaryrefslogtreecommitdiff
path: root/target-lm32/helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'target-lm32/helper.c')
-rw-r--r--target-lm32/helper.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/target-lm32/helper.c b/target-lm32/helper.c
index e5536c0ecb..67ba278e27 100644
--- a/target-lm32/helper.c
+++ b/target-lm32/helper.c
@@ -118,11 +118,12 @@ static bool check_watchpoints(CPULM32State *env)
void lm32_debug_excp_handler(CPULM32State *env)
{
+ CPUState *cs = CPU(lm32_env_get_cpu(env));
CPUBreakpoint *bp;
- if (env->watchpoint_hit) {
- if (env->watchpoint_hit->flags & BP_CPU) {
- env->watchpoint_hit = NULL;
+ if (cs->watchpoint_hit) {
+ if (cs->watchpoint_hit->flags & BP_CPU) {
+ cs->watchpoint_hit = NULL;
if (check_watchpoints(env)) {
raise_exception(env, EXCP_WATCHPOINT);
} else {