x86_64: Set vector in iframe/debug state to 99 for syscalls.
Although syscalls are done through SYSCALL and therefore don't actually have an interrupt number, set it to 99 (the syscall vector on 32-bit) in the iframe so that a syscall frame can be identified. Also added vector/error_code to x86_64_debug_cpu_state for Debugger to use, not sure why I didn't put them there in the first place.
This commit is contained in:
parent
143cfee84c
commit
271b27d5a3
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue