Make gdb stack trace back to usermode work again

svn path=/trunk/; revision=13228
This commit is contained in:
Gé van Geldorp 2005-01-23 20:57:45 +00:00
parent c377a52fa4
commit 05934c33b6

View file

@ -97,12 +97,12 @@ _KiSystemService:
#ifdef DBG #ifdef DBG
/* Trick gdb 6 into backtracing over the system call */ /* Trick gdb 6 into backtracing over the system call */
pushl 4(%ebp) /* DebugEIP */ // + 0x74 mov 0x6c(%esp), %ebx
pushl (%ebp) /* DebugEBP */ // + 0x78 pushl 4(%ebx) /* DebugEIP */ // + 0x74
#else #else
pushl 0x60(%esp) /* DebugEIP */ // + 0x74 pushl 0x60(%esp) /* DebugEIP */ // + 0x74
pushl %ebp /* DebugEBP */ // + 0x78
#endif #endif
pushl %ebp /* DebugEBP */ // + 0x78
/* Load the segment registers */ /* Load the segment registers */
sti sti
@ -121,6 +121,16 @@ _KiSystemService:
movl %ebp, KTHREAD_TRAP_FRAME(%esi) movl %ebp, KTHREAD_TRAP_FRAME(%esi)
CheckValidCall: CheckValidCall:
#ifdef DBG
/*
* GDB thinks the function starts here and
* wants a standard prolog, so let's give it
*/
pushl %ebp
movl %esp,%ebp
popl %ebp
#endif
/* /*
* Find out which table offset to use. Converts 0x1124 into 0x10. * Find out which table offset to use. Converts 0x1124 into 0x10.
@ -141,16 +151,6 @@ CheckValidCall:
/* Invalid ID, try to load Win32K Table */ /* Invalid ID, try to load Win32K Table */
jnb KiBBTUnexpectedRange jnb KiBBTUnexpectedRange
#ifdef DBG
/*
* GDB thinks the function starts here and
* wants a standard prolog, so let's give it
*/
pushl %ebp
movl %esp,%ebp
popl %ebp
#endif
/* Users's current stack frame pointer is source */ /* Users's current stack frame pointer is source */
movl %edx, %esi movl %edx, %esi