1 diff --git a/src/kern/ia32/thread-ia32.cpp b/src/kern/ia32/thread-ia32.cpp
2 index d6fb000..7be482b 100644
3 --- a/src/kern/ia32/thread-ia32.cpp
4 +++ b/src/kern/ia32/thread-ia32.cpp
5 @@ -30,6 +30,7 @@ EXTENSION class Thread
8 static int (*int3_handler)(Trap_state*);
9 + static int (*int42_handler)(Trap_state*);
13 @@ -196,6 +197,26 @@ Thread::handle_slow_trap(Trap_state *ts)
17 + if (ts->_trapno == 6)
19 + LOG_MSG_3VAL(current(), "UD2", dbg_id(), ts->ip(), 0);
21 + //Sched_context::rq.current().invalidate_sched();
22 + switch_sched(sched(), &Sched_context::rq.current());
27 + if (ts->_trapno == 13 && ts->_err == 530 /* INT 0x42 */)
29 + /*printf("Replica %lx bailout @ %lx\n", dbg_id(), ts->ip());*/
32 + if (int42_handler && int42_handler(ts))
37 if (send_exception(ts))
40 @@ -517,6 +538,7 @@ IMPLEMENTATION[ia32 || amd64]:
41 #include "terminate.h"
43 int (*Thread::int3_handler)(Trap_state*);
44 +int (*Thread::int42_handler)(Trap_state*);
45 DEFINE_PER_CPU Per_cpu<Thread::Dbg_stack> Thread::dbg_stack;
47 STATIC_INITIALIZER_P (int3_handler_init, KDB_INIT_PRIO);
48 @@ -526,6 +548,7 @@ void
51 Thread::set_int3_handler(Thread::handle_int3);
52 + Thread::set_int42_handler(Thread::handle_int3);
55 IMPLEMENT static inline NEEDS ["gdt.h"]
56 @@ -575,6 +598,13 @@ Thread::set_int3_handler(int (*handler)(Trap_state *ts))
57 int3_handler = handler;
63 +Thread::set_int42_handler(int (*handler)(Trap_state *ts))
65 + int42_handler = handler;
68 * Default handle for int3 extensions if JDB is disabled. If the JDB is
69 * available, Jdb::handle_int3_threadctx is called instead.