Author: tfaber Date: Sun Apr 17 09:55:13 2016 New Revision: 71175
URL: http://svn.reactos.org/svn/reactos?rev=71175&view=rev Log: [NTOS:KE] - In debug builds, restore EBP early in KiSwitchThreads to get a sensible backtrace CORE-11123
Modified: trunk/reactos/ntoskrnl/ke/i386/ctxswitch.S
Modified: trunk/reactos/ntoskrnl/ke/i386/ctxswitch.S URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/ctxswitch.... ============================================================================== --- trunk/reactos/ntoskrnl/ke/i386/ctxswitch.S [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ke/i386/ctxswitch.S [iso-8859-1] Sun Apr 17 09:55:13 2016 @@ -63,6 +63,10 @@ @KiSwitchThreads@8: /* Load the new kernel stack and switch OS to new thread */ mov esp, edx +#if DBG + /* Restore the frame pointer early to get sensible backtraces */ + mov ebp, [esp+12] +#endif call @KiSwapContextExit@8
/* Now we're on the new thread. Return to the caller to restore registers */