support PTRACE_SINGLESTEP.

support debug/int3 exception.
This commit is contained in:
Susumu Komae
2015-01-29 15:48:05 +09:00
committed by postpeta
parent f97f8dbab3
commit bd5f43b119
5 changed files with 95 additions and 3 deletions

View File

@@ -154,3 +154,25 @@ enter_user_mode:
POP_ALL_REGS
addq $8, %rsp
iretq
.globl debug_exception
debug_exception:
cld
pushq $0 /* error */
PUSH_ALL_REGS
movq %rsp, %rdi
call debug_handler
POP_ALL_REGS
addq $8, %rsp
iretq
.globl int3_exception
int3_exception:
cld
pushq $0 /* error */
PUSH_ALL_REGS
movq %rsp, %rdi
call int3_handler
POP_ALL_REGS
addq $8, %rsp
iretq