[PATCH 00/11] Various fixes to stack unwinding

Eric Pouech eric.pouech at orange.fr
Sun Mar 13 15:30:04 CDT 2011

The following patchset fixes several flaws in current StackWalk implementation.
The good news:
- the backtraces shown in gecko look more correct (they weren't)
- some more stackwalk tests in winedbg now pass
- the fixes are mainly for unwinding on i386 (32bit) and x86_64 CPUs
- there were also some bugs (now fixed) in unwinding with using debug info
  (dwarf and PDB (Codeview) had issues)

The bad news:
- gcc now processes more and more dwarf unwinding expression that are too complex
  to fit into the dbghelp interface. This has to be revisited.


Eric Pouech (11):
      [DbgHelp]: in i386 stack unwinder, ensure we always return decent 64bit values
      [DbgHelp]: fix StackWalk when dwarf or pdb unwinders are called on first frame (CPU i386)
      [DbgHelp]: in dwarf unwinder, fix the last valid IP value to be used for a given line of Call Frame Information
      [DbgHelp]: when doing a stack backtrace on i386 with dwarf or pdb unwinders, get the PC from the right frame
      [DbgHelp]: in i386 stackwalk implementation, store the frame index in the private information
      [DbgHelp]: in msc unwinding code (from FPO extended data), take care of cases where several variables are stored in the same hash
      [DbgHelp]: for the internal functions on x86_64 stack unwinding, only rely on CONTEXT information, and manage STACKFRAME64 updates in outter functions
      [DbgHelp]: fix unwinding on x86-64 (correct frame and context)
      [DbgHelp]: when managing DW_OP_deref_size, always ensure we read the size parameter
      [DbgHelp]: in dwarf debug functions, use register name instead of register value
      [DbgHelp]: set also reloc_delta information in module description for PE native modules

 dlls/dbghelp/cpu_i386.c   |  231 ++++++++++++++++++++++++---------------------
 dlls/dbghelp/cpu_x86_64.c |  125 +++++++++++++++---------
 dlls/dbghelp/dwarf.c      |   24 +++--
 dlls/dbghelp/msc.c        |   26 ++++-
 dlls/dbghelp/pe_module.c  |    1 
 programs/winedbg/stack.c  |    5 -
 6 files changed, 236 insertions(+), 176 deletions(-)

Eric Pouech

More information about the wine-patches mailing list