diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2014-09-12 14:06:48 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2014-09-12 14:06:48 +0100 |
commit | 86025ee4438e6e46eed767aad7c17ea94bb5c19b (patch) | |
tree | 450e897472d473d11dc8a0369660fee861bb70cb /cpu-exec.c | |
parent | 08225676b279fd14683275b65ed701972e008043 (diff) |
cpu-exec: Make debug_excp_handler a QOM CPU method
Make the debug_excp_handler target specific hook into a QOM
CPU method.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'cpu-exec.c')
-rw-r--r-- | cpu-exec.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/cpu-exec.c b/cpu-exec.c index e9adf563f6..bd93165209 100644 --- a/cpu-exec.c +++ b/cpu-exec.c @@ -295,16 +295,10 @@ static inline TranslationBlock *tb_find_fast(CPUArchState *env) return tb; } -static CPUDebugExcpHandler *debug_excp_handler; - -void cpu_set_debug_excp_handler(CPUDebugExcpHandler *handler) -{ - debug_excp_handler = handler; -} - static void cpu_handle_debug_exception(CPUArchState *env) { CPUState *cpu = ENV_GET_CPU(env); + CPUClass *cc = CPU_GET_CLASS(cpu); CPUWatchpoint *wp; if (!cpu->watchpoint_hit) { @@ -312,9 +306,8 @@ static void cpu_handle_debug_exception(CPUArchState *env) wp->flags &= ~BP_WATCHPOINT_HIT; } } - if (debug_excp_handler) { - debug_excp_handler(env); - } + + cc->debug_excp_handler(cpu); } /* main execution loop */ |