mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-01 23:03:54 -06:00
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>
This commit is contained in:
parent
08225676b2
commit
86025ee443
13 changed files with 27 additions and 28 deletions
13
cpu-exec.c
13
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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue