# Cinder

# StackWalker Class Reference

`#include <StackWalker.h>`

Inherited by cinder::CinderStackWalker.

List of all members.

## Classes
struct | CallstackEntry
## Public Types
enum | StackWalkOptions { RetrieveNone = 0, RetrieveSymbol = 1, RetrieveLine = 2, RetrieveModuleInfo = 4, RetrieveFileVersion = 8, RetrieveVerbose = 0xF, SymBuildPath = 0x10, SymUseSymSrv = 0x20, SymAll = 0x30, OptionsAll = 0x3F }
typedef enum StackWalker::StackWalkOptions | StackWalkOptions
typedef BOOL(__stdcall * | PReadProcessMemoryRoutine )(HANDLE hProcess, DWORD64 qwBaseAddress, PVOID lpBuffer, DWORD nSize, LPDWORD lpNumberOfBytesRead, LPVOID pUserData)
## Public Member Functions
| StackWalker (int options=OptionsAll, LPCSTR szSymPath=NULL, DWORD dwProcessId=GetCurrentProcessId(), HANDLE hProcess=GetCurrentProcess())
| StackWalker (DWORD dwProcessId, HANDLE hProcess)
virtual | ~StackWalker ()
BOOL | LoadModules ()
BOOL | ShowCallstack (HANDLE hThread=GetCurrentThread(), const CONTEXT *context=NULL, PReadProcessMemoryRoutine readMemoryFunction=NULL, LPVOID pUserData=NULL)
## Protected Types
enum | { STACKWALK_MAX_NAMELEN = 1024 }
enum | CallstackEntryType { firstEntry, nextEntry, lastEntry }
typedef struct StackWalker::CallstackEntry | CallstackEntry
## Protected Member Functions
virtual void | OnSymInit (LPCSTR szSearchPath, DWORD symOptions, LPCSTR szUserName)
virtual void | OnLoadModule (LPCSTR img, LPCSTR mod, DWORD64 baseAddr, DWORD size, DWORD result, LPCSTR symType, LPCSTR pdbName, ULONGLONG fileVersion)
virtual void | OnCallstackEntry (CallstackEntryType eType, CallstackEntry &entry)
virtual void | OnDbgHelpErr (LPCSTR szFuncName, DWORD gle, DWORD64 addr)
virtual void | OnOutput (LPCSTR szText)
## Static Protected Member Functions
static BOOL __stdcall | myReadProcMem (HANDLE hProcess, DWORD64 qwBaseAddress, PVOID lpBuffer, DWORD nSize, LPDWORD lpNumberOfBytesRead)
## Protected Attributes
StackWalkerInternal * | m_sw
HANDLE | m_hProcess
DWORD | m_dwProcessId
BOOL | m_modulesLoaded
LPSTR | m_szSymPath
int | m_options
int | m_MaxRecursionCount
friend | StackWalkerInternal

## Member Typedef Documentation

typedef enum StackWalker::StackWalkOptions StackWalker::StackWalkOptions

typedef BOOL(__stdcall * StackWalker::PReadProcessMemoryRoutine)(HANDLE hProcess, DWORD64 qwBaseAddress, PVOID lpBuffer, DWORD nSize, LPDWORD lpNumberOfBytesRead, LPVOID pUserData)

typedef struct StackWalker::CallstackEntry StackWalker::CallstackEntry`[protected]`

## Member Enumeration Documentation

enum StackWalker::StackWalkOptions

Enumerator:

  RetrieveNone |
  RetrieveSymbol |
  RetrieveLine |
  RetrieveModuleInfo |
  RetrieveFileVersion |
  RetrieveVerbose |
  SymBuildPath |
  SymUseSymSrv |
  SymAll |
  OptionsAll |

anonymous enum`[protected]`

Enumerator:

  STACKWALK_MAX_NAMELEN |

enum StackWalker::CallstackEntryType`[protected]`

Enumerator:

  firstEntry |
  nextEntry |
  lastEntry |

## Constructor & Destructor Documentation

StackWalker::StackWalker | ( | int | options = `OptionsAll`,
|  | LPCSTR | szSymPath = `NULL`,
|  | DWORD | dwProcessId = `GetCurrentProcessId()`,
|  | HANDLE | hProcess = `GetCurrentProcess()` |
| ) |  |  |

StackWalker::StackWalker | ( | DWORD | dwProcessId,
|  | HANDLE | hProcess |
| ) |  |  |

StackWalker::~StackWalker | ( |  | ) | `[virtual]`

## Member Function Documentation

BOOL StackWalker::LoadModules | ( |  | ) |

BOOL StackWalker::ShowCallstack | ( | HANDLE | hThread = `GetCurrentThread()`,
|  | const CONTEXT * | context = `NULL`,
|  | PReadProcessMemoryRoutine | readMemoryFunction = `NULL`,
|  | LPVOID | pUserData = `NULL` |
| ) |  |  |

void StackWalker::OnSymInit | ( | LPCSTR | szSearchPath,
|  | DWORD | symOptions,
|  | LPCSTR | szUserName |
| ) |  |  | `[protected, virtual]`

void StackWalker::OnLoadModule | ( | LPCSTR | img,
|  | LPCSTR | mod,
|  | DWORD64 | baseAddr,
|  | DWORD | size,
|  | DWORD | result,
|  | LPCSTR | symType,
|  | LPCSTR | pdbName,
|  | ULONGLONG | fileVersion |
| ) |  |  | `[protected, virtual]`

void StackWalker::OnCallstackEntry | ( | CallstackEntryType | eType,
|  | CallstackEntry & | entry |
| ) |  |  | `[protected, virtual]`

void StackWalker::OnDbgHelpErr | ( | LPCSTR | szFuncName,
|  | DWORD | gle,
|  | DWORD64 | addr |
| ) |  |  | `[protected, virtual]`

void StackWalker::OnOutput | ( | LPCSTR | szText | ) | `[protected, virtual]`

BOOL __stdcall StackWalker::myReadProcMem | ( | HANDLE | hProcess,
|  | DWORD64 | qwBaseAddress,
|  | PVOID | lpBuffer,
|  | DWORD | nSize,
|  | LPDWORD | lpNumberOfBytesRead |
| ) |  |  | `[static, protected]`

## Member Data Documentation

StackWalkerInternal* StackWalker::m_sw`[protected]`

HANDLE StackWalker::m_hProcess`[protected]`

DWORD StackWalker::m_dwProcessId`[protected]`

BOOL StackWalker::m_modulesLoaded`[protected]`

LPSTR StackWalker::m_szSymPath`[protected]`

int StackWalker::m_options`[protected]`

int StackWalker::m_MaxRecursionCount`[protected]`

friend StackWalker::StackWalkerInternal`[protected]`

The documentation for this class was generated from the following files:

- include/cinder/msw/StackWalker.h
- src/cinder/msw/StackWalker.cpp