From 4d700fe2aec49ceed5b35cf79b87bd12cb14a309 Mon Sep 17 00:00:00 2001 From: Adrian-Ken Rueegsegger Date: Tue, 21 Apr 2015 23:05:58 +0200 Subject: [PATCH] hw_x86_64: Emit debug message on #UD Print information when handling an undefined instruction exception. --- repos/base-hw/src/core/spec/x86/kernel/thread.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/repos/base-hw/src/core/spec/x86/kernel/thread.cc b/repos/base-hw/src/core/spec/x86/kernel/thread.cc index 528eca0974..7656a376d4 100644 --- a/repos/base-hw/src/core/spec/x86/kernel/thread.cc +++ b/repos/base-hw/src/core/spec/x86/kernel/thread.cc @@ -35,6 +35,11 @@ void Thread::exception(unsigned const cpu) PWRN("%s -> %s: FPU error", pd_label(), label()); _stop(); return; + case UNDEFINED_INSTRUCTION: + PWRN("%s -> %s: undefined instruction at ip=%p", + pd_label(), label(), (void*)ip); + _stop(); + return; case SUPERVISOR_CALL: _call(); return;