winedbg: output of the bt command misses sometimes a frame

Eric Pouech eric.pouech at
Sat Feb 6 13:07:46 CST 2010

Bernhard Übelacker a écrit :
> Hello,
> as I was debugging in wine I wondered if following behaviour is intended or
> could be considered a bug (and should be filed in bugtracker?).
> When the debugger's current position is on the opening curly bracket of a
> function a "bt" command writes a different stack as if the current position
> is on the next instruction in this function.
> What me makes wonder is the frame 0 is always correct but the calling
> function is not in the stack at all in the first bt:
this is likely because the prolog of IsWindow hasn't been run yet
try next (while on first {
and you should get a decent backtrace

actually, on i386, at the point you're considering
eip : is already in new function
but stack (ebp, esp) hasn't been initialized yet to new function => the 
prolog does it

actually, this is mainly due to the fact that winedbg doesn't do lots of 
magic about guessing prolog size, except when debug information is PDB 
(in that case, this very information is in the debug format)
we used to do some weird heuristics... like setting break address for 
function foo at second line number for this function, which is wrong of 
real fix would be (as gdb does in some cases) to disassembly the first 
bytes of the functions to guess the prolog size


Eric Pouech
"The problem with designing something completely foolproof is to underestimate the ingenuity of a complete idiot." (Douglas Adams)

More information about the wine-devel mailing list