X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Kernel%2Farch%2Fx86%2Ferrors.c;h=22ad1a39afda8d45fc16a80196c79f7e3609bd89;hb=046980a1afd982af07dc97aaadb186e31eebb340;hp=1e0278b6ab9f691211e0bf959c40828beffa7e30;hpb=2d83a99f3202f0e4688b58405f67604a24420861;p=tpg%2Facess2.git diff --git a/Kernel/arch/x86/errors.c b/Kernel/arch/x86/errors.c index 1e0278b6..22ad1a39 100644 --- a/Kernel/arch/x86/errors.c +++ b/Kernel/arch/x86/errors.c @@ -60,6 +60,18 @@ void ErrorHandler(tRegs *Regs) __asm__ __volatile__ ("cli"); + // Debug exception (used for single-stepping) + if(Regs->int_num == 1) + { + static Uint32 lastEIP = 0; + tThread *thread = Proc_GetCurThread(); + if( Regs->eip == lastEIP ) + return; + Log("%p(%i %s) IP=%08x", thread, thread->TID, thread->ThreadName, Regs->eip); + lastEIP = Regs->eip; + return ; + } + // Page Fault if(Regs->int_num == 14) {