Eric Pouech : dbghelp: In i386 stack unwinder, only check for NULL ebp after calling the dwarf/ MSVC unwinders as they allow NULL ebp.
Alexandre Julliard
julliard at winehq.org
Tue Feb 14 13:23:32 CST 2012
Module: wine
Branch: master
Commit: 90207b1d6966d09ea5ed34dc1d6141fd7f4292cd
URL: http://source.winehq.org/git/wine.git/?a=commit;h=90207b1d6966d09ea5ed34dc1d6141fd7f4292cd
Author: Eric Pouech <eric.pouech at orange.fr>
Date: Mon Feb 13 21:42:04 2012 +0100
dbghelp: In i386 stack unwinder, only check for NULL ebp after calling the dwarf/MSVC unwinders as they allow NULL ebp.
---
dlls/dbghelp/cpu_i386.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/dbghelp/cpu_i386.c b/dlls/dbghelp/cpu_i386.c
index 3a66def..d15afdd 100644
--- a/dlls/dbghelp/cpu_i386.c
+++ b/dlls/dbghelp/cpu_i386.c
@@ -115,6 +115,7 @@ static BOOL fetch_next_frame32(struct cpu_stack_walk* csw,
/* do a simple unwind using ebp
* we assume a "regular" prologue in the function has been used
*/
+ if (!context->Ebp) return FALSE;
context->Esp = context->Ebp + 2 * sizeof(DWORD);
if (!sw_read_mem(csw, context->Ebp + sizeof(DWORD), &val32, sizeof(DWORD)))
{
@@ -273,7 +274,6 @@ static BOOL i386_stack_walk(struct cpu_stack_walk* csw, LPSTACKFRAME64 frame, CO
}
else
{
- if (frame->AddrFrame.Offset == 0) goto done_err;
if (frame->AddrFrame.Mode == AddrModeFlat)
{
assert(curr_mode == stm_32bit);
@@ -389,7 +389,8 @@ static BOOL i386_stack_walk(struct cpu_stack_walk* csw, LPSTACKFRAME64 frame, CO
frame->AddrPC = frame->AddrReturn;
frame->AddrStack.Offset = frame->AddrFrame.Offset + 2 * sizeof(WORD);
/* "pop up" previous BP value */
- if (!sw_read_mem(csw, sw_xlat_addr(csw, &frame->AddrFrame),
+ if (!frame->AddrFrame.Offset ||
+ !sw_read_mem(csw, sw_xlat_addr(csw, &frame->AddrFrame),
&val16, sizeof(WORD)))
goto done_err;
frame->AddrFrame.Offset = val16;
More information about the wine-cvs
mailing list