diff --git a/headers/os/arch/x86_64/arch_debugger.h b/headers/os/arch/x86_64/arch_debugger.h index 59b27c3ba3..e4607d2fd9 100644 --- a/headers/os/arch/x86_64/arch_debugger.h +++ b/headers/os/arch/x86_64/arch_debugger.h @@ -58,6 +58,8 @@ struct x86_64_debug_cpu_state { uint64 rcx; uint64 rbx; uint64 rax; + uint64 vector; + uint64 error_code; uint64 rip; uint64 cs; uint64 rflags; diff --git a/src/system/kernel/arch/x86/64/interrupts.S b/src/system/kernel/arch/x86/64/interrupts.S index b5157e1344..71a0d106db 100644 --- a/src/system/kernel/arch/x86/64/interrupts.S +++ b/src/system/kernel/arch/x86/64/interrupts.S @@ -308,7 +308,7 @@ FUNCTION(x86_64_syscall_entry): push $USER_CODE_SEG // cs push %rcx // ip push $0 // error_code - push $0 // vector + push $99 // vector PUSH_IFRAME_BOTTOM(IFRAME_TYPE_SYSCALL) cld diff --git a/src/system/kernel/arch/x86/arch_user_debugger.cpp b/src/system/kernel/arch/x86/arch_user_debugger.cpp index 3857c3d06a..9c1a721b1e 100644 --- a/src/system/kernel/arch/x86/arch_user_debugger.cpp +++ b/src/system/kernel/arch/x86/arch_user_debugger.cpp @@ -90,6 +90,8 @@ get_iframe_registers(const iframe* frame, debug_cpu_state* cpuState) cpuState->rcx = frame->cx; cpuState->rbx = frame->bx; cpuState->rax = frame->ax; + cpuState->vector = frame->vector; + cpuState->error_code = frame->error_code; cpuState->rip = frame->ip; cpuState->cs = frame->cs; cpuState->rflags = frame->flags;