On 19/10/25 17:14, Julian Ganz wrote:
We recently introduced API for registering callbacks for trap related
events as well as the corresponding hook functions. Due to differences
between architectures, the latter need to be called from target specific
code.

This change places the hook for x86 targets.

Signed-off-by: Julian Ganz <[email protected]>
---
  target/i386/tcg/excp_helper.c | 3 +++
  target/i386/tcg/seg_helper.c  | 4 ++++
  2 files changed, 7 insertions(+)


  G_NORETURN void helper_raise_interrupt(CPUX86State *env, int intno,
                                            int next_eip_addend)
@@ -93,6 +94,7 @@ void raise_interrupt2(CPUX86State *env, int intno,
                        uintptr_t retaddr)

As a future cleanup, rename raise_interrupt2() -> raise_exception()?

  {
      CPUState *cs = env_cpu(env);
+    uint64_t last_pc = env->eip + env->segs[R_CS].base;

Reviewed-by: Philippe Mathieu-Daudé <[email protected]>


Reply via email to