summaryrefslogtreecommitdiff
path: root/target-xtensa
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2013-08-26 18:23:18 +0200
committerAndreas Färber <afaerber@suse.de>2014-03-13 19:20:47 +0100
commitff4700b05cfb305a880762c288b88ca01c782352 (patch)
tree52b073985fe082c98a9eb42c628810f588da0fc1 /target-xtensa
parent0429a9719551a4aa794051aeb8c7b42658902c27 (diff)
downloadqemu-ff4700b05cfb305a880762c288b88ca01c782352.tar.gz
cpu: Move watchpoint fields from CPU_COMMON to CPUState
Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'target-xtensa')
-rw-r--r--target-xtensa/cpu.h2
-rw-r--r--target-xtensa/helper.c8
2 files changed, 6 insertions, 4 deletions
diff --git a/target-xtensa/cpu.h b/target-xtensa/cpu.h
index 4bae693c6d..e210bacdff 100644
--- a/target-xtensa/cpu.h
+++ b/target-xtensa/cpu.h
@@ -359,7 +359,7 @@ typedef struct CPUXtensaState {
int exception_taken;
/* Watchpoints for DBREAK registers */
- CPUWatchpoint *cpu_watchpoint[MAX_NDBREAK];
+ struct CPUWatchpoint *cpu_watchpoint[MAX_NDBREAK];
CPU_COMMON
} CPUXtensaState;
diff --git a/target-xtensa/helper.c b/target-xtensa/helper.c
index 259878837f..8a9cb0a825 100644
--- a/target-xtensa/helper.c
+++ b/target-xtensa/helper.c
@@ -81,11 +81,13 @@ static uint32_t check_hw_breakpoints(CPUXtensaState *env)
void xtensa_breakpoint_handler(CPUXtensaState *env)
{
- if (env->watchpoint_hit) {
- if (env->watchpoint_hit->flags & BP_CPU) {
+ CPUState *cs = CPU(xtensa_env_get_cpu(env));
+
+ if (cs->watchpoint_hit) {
+ if (cs->watchpoint_hit->flags & BP_CPU) {
uint32_t cause;
- env->watchpoint_hit = NULL;
+ cs->watchpoint_hit = NULL;
cause = check_hw_breakpoints(env);
if (cause) {
debug_exception_env(env, cause);