From e7b5998b96c859efbbfb67ca46bbc1b2e3555906 Mon Sep 17 00:00:00 2001 From: "Evgeny Grechnikov (Diamond)" Date: Sat, 10 Mar 2007 11:27:17 +0000 Subject: [PATCH] mtdbg knows about syscall and sysenter git-svn-id: svn://kolibrios.org@410 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/develop/mtdbg/mtdbg.asm | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/programs/develop/mtdbg/mtdbg.asm b/programs/develop/mtdbg/mtdbg.asm index e5252aea5d..8747c087af 100644 --- a/programs/develop/mtdbg/mtdbg.asm +++ b/programs/develop/mtdbg/mtdbg.asm @@ -1719,6 +1719,10 @@ OnStep: jnz .doit cmp al, 0xCD jz .int + cmp ax, 0x050F + jz .syscall_enter + cmp ax, 0x340F + jz .syscall_enter ; resume process .doit: call GoOn @@ -1727,6 +1731,9 @@ OnStep: mov [bAfterGo], 2 @@: ret +.syscall_enter: + and byte [_eflags+1], not 1 ; clear TF - avoid system halt (!) + call set_context .int: mov eax, [_eip] inc eax @@ -2910,6 +2917,15 @@ cseggs: db 0xFB,3,'sti' db 0xFC,3,'cld' db 0xFD,3,'std' +csysenter: +csyscall: +ccpuid: +crdtsc: + call @f + db 0x05,7,'syscall' + db 0x31,5,'rdtsc' + db 0x34,8,'sysenter' + db 0xA2,5,'cpuid' @@: pop esi @@: @@ -2954,9 +2970,6 @@ c66: center: caam: cxlat: -crdtsc: -csysenter: -ccpuid: ccmpxchg: cbsf: cbsr: @@ -4681,7 +4694,7 @@ disasm_table_1: dd cop0, cop0, cop0, cop0, cop0, cop0, cop1, cop1 disasm_table_2: - dd cunk, cunk, cunk, cunk, cunk, cunk, cunk, cunk ; 0x + dd cunk, cunk, cunk, cunk, cunk, csyscall,cunk,cunk ; 0x dd cunk, cunk, cunk, cunk, cunk, cunk, cunk, cunk dd cunk, cunk, cunk, cunk, cunk, cunk, cunk, cunk ; 1x dd cunk, cunk, cunk, cunk, cunk, cunk, cunk, cunk