A class that can help with walking the stack for debugging purposes (Windows version) More...
#include <stackwalker.h>
Classes | |
struct | CallstackEntry |
Container for each Callstack-Entry. More... | |
Public Types | |
typedef BOOL(__stdcall * | PReadProcessMemoryRoutine) (HANDLE hProcess, DWORD64 qwBaseAddress, PVOID lpBuffer, DWORD nSize, LPDWORD lpNumberOfBytesRead, LPVOID pUserData) |
enum | StackWalkOptions { RetrieveNone = 0, RetrieveSymbol = 1, RetrieveLine = 2, RetrieveModuleInfo = 4, RetrieveFileVersion = 8, RetrieveVerbose = 0xF, SymBuildPath = 0x10, SymUseSymSrv = 0x20, SymAll = 0x30, OptionsAll = 0x3F } |
Public Member Functions | |
BOOL | LoadModules () |
virtual void | OnOutput (LPCSTR)=0 |
void | ShowCallstack () |
BOOL | ShowCallstack (HANDLE hThread=GetCurrentThread(), const CONTEXT *context=NULL, PReadProcessMemoryRoutine readMemoryFunction=NULL, LPVOID pUserData=NULL) |
StackWalker () | |
StackWalker (DWORD dwProcessId, HANDLE hProcess) | |
StackWalker (int options=(int) OptionsAll, LPCSTR szSymPath=NULL, DWORD dwProcessId=GetCurrentProcessId(), HANDLE hProcess=GetCurrentProcess()) | |
virtual | ~StackWalker () |
virtual | ~StackWalker () |
Protected Types | |
enum | { STACKWALK_MAX_NAMELEN = 1024 } |
enum | CallstackEntryType { firstEntry, nextEntry, lastEntry } |
Protected Member Functions | |
virtual void | OnCallstackEntry (CallstackEntryType eType, CallstackEntry &entry) |
virtual void | OnDbgHelpErr (LPCSTR szFuncName, DWORD gle, DWORD64 addr) |
virtual void | OnLoadModule (LPCSTR img, LPCSTR mod, DWORD64 baseAddr, DWORD size, DWORD result, LPCSTR symType, LPCSTR pdbName, ULONGLONG fileVersion) |
virtual void | OnOutput (LPCSTR szText) |
virtual void | OnSymInit (LPCSTR szSearchPath, DWORD symOptions, LPCSTR szUserName) |
StackWalker & | operator= (StackWalker const &)=delete |
StackWalker (StackWalker const &)=delete | |
Static Protected Member Functions | |
static BOOL __stdcall | myReadProcMem (HANDLE hProcess, DWORD64 qwBaseAddress, PVOID lpBuffer, DWORD nSize, LPDWORD lpNumberOfBytesRead) |
Protected Attributes | |
DWORD | m_dwProcessId |
HANDLE | m_hProcess |
BOOL | m_modulesLoaded |
int | m_options |
StackWalkerInternal * | m_sw |
LPSTR | m_szSymPath |
friend | StackWalkerInternal |
A class that can help with walking the stack for debugging purposes (Windows version)
A class that can help with walking the stack for debugging purposes (Linux version)
Definition at line 98 of file stackwalker.h.
typedef BOOL(__stdcall* StackWalker::PReadProcessMemoryRoutine) (HANDLE hProcess, DWORD64 qwBaseAddress, PVOID lpBuffer, DWORD nSize, LPDWORD lpNumberOfBytesRead, LPVOID pUserData) |
Definition at line 142 of file stackwalker.h.
|
protected |
Enumerator | |
---|---|
STACKWALK_MAX_NAMELEN |
Definition at line 160 of file stackwalker.h.
|
protected |
Enumerator | |
---|---|
firstEntry | |
nextEntry | |
lastEntry |
Definition at line 180 of file stackwalker.h.
Enumerator | |
---|---|
RetrieveNone | |
RetrieveSymbol | |
RetrieveLine | |
RetrieveModuleInfo | |
RetrieveFileVersion | |
RetrieveVerbose | |
SymBuildPath | |
SymUseSymSrv | |
SymAll | |
OptionsAll |
Definition at line 101 of file stackwalker.h.
StackWalker::StackWalker | ( | int | options = (int) OptionsAll , |
LPCSTR | szSymPath = NULL , |
||
DWORD | dwProcessId = GetCurrentProcessId() , |
||
HANDLE | hProcess = GetCurrentProcess() |
||
) |
Definition at line 825 of file stackwalker.cpp.
StackWalker::StackWalker | ( | DWORD | dwProcessId, |
HANDLE | hProcess | ||
) |
Definition at line 816 of file stackwalker.cpp.
|
virtual |
Definition at line 841 of file stackwalker.cpp.
|
protecteddelete |
StackWalker::StackWalker | ( | ) |
Definition at line 96 of file stackwalker_linux.cpp.
|
virtual |
BOOL StackWalker::LoadModules | ( | ) |
Definition at line 851 of file stackwalker.cpp.
|
staticprotected |
Definition at line 1201 of file stackwalker.cpp.
|
protectedvirtual |
Definition at line 1237 of file stackwalker.cpp.
Definition at line 1261 of file stackwalker.cpp.
|
protectedvirtual |
Definition at line 1221 of file stackwalker.cpp.
|
protectedvirtual |
Reimplemented in JournalStackWalker, DumpStackWalker, and JournalExceptionStackWalker.
Definition at line 1300 of file stackwalker.cpp.
|
pure virtual |
Implemented in JournalStackWalker, DumpStackWalker, and JournalExceptionStackWalker.
|
protectedvirtual |
Definition at line 1268 of file stackwalker.cpp.
|
protecteddelete |
void StackWalker::ShowCallstack | ( | ) |
Definition at line 104 of file stackwalker_linux.cpp.
BOOL StackWalker::ShowCallstack | ( | HANDLE | hThread = GetCurrentThread() , |
const CONTEXT * | context = NULL , |
||
PReadProcessMemoryRoutine | readMemoryFunction = NULL , |
||
LPVOID | pUserData = NULL |
||
) |
Definition at line 981 of file stackwalker.cpp.
|
protected |
Definition at line 190 of file stackwalker.h.
|
protected |
Definition at line 189 of file stackwalker.h.
|
protected |
Definition at line 191 of file stackwalker.h.
|
protected |
Definition at line 194 of file stackwalker.h.
|
protected |
Definition at line 188 of file stackwalker.h.
|
protected |
Definition at line 192 of file stackwalker.h.
|
protected |
Definition at line 198 of file stackwalker.h.