OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
Stackwalker.cpp File Reference
#include <owl/pch.h>
#include <windows.h>
#include <string>
#include <vector>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <crtdbg.h>
#include <tchar.h>
#include <algorithm>
#include "stackwalker.h"
#include <imagehlp.h>

Go to the source code of this file.

Macros

#define HASH_ENTRY_REMOVE_AT_FREE
#define ALLOC_HASH_ENTRIES   8192
#define MAX_ESP_LEN_BUF   0x500
#define IGNORE_CRT_ALLOC
#define LOG_FILE_MAX_SIZE   1024*128
#define WITH_IMALLOC_SPY
#define SYMOPT_LOAD_LINES   0x00000010
#define MAX_EIP_LEN_BUF   4
#define ALLOC_ENTRY_NOT_FOUND   0xFFFFFFFF
#define nNoMansLandSize   4
#define pbData(pblock)
#define pHdr(pbData)
#define gle   (GetLastError())
#define lenof(a)
#define MAXNAMELEN   1024
#define IMGSYMLEN   ( sizeof IMAGEHLP_SYMBOL )
#define TTBUFLEN   8096
#define MAX_MODULE_NAME32   255
#define TH32CS_SNAPMODULE   0x00000008

Functions

int InitAllocCheckWN (eAllocCheckOutput eOutput, LPCTSTR pszFileName, ULONG ulShowStackAtAlloc)
int InitAllocCheck (eAllocCheckOutput eOutput, BOOL bSetUnhandledExeptionFilter, ULONG ulShowStackAtAlloc)
ULONG DeInitAllocCheck (void)
DWORD StackwalkFilter (EXCEPTION_POINTERS *ep, DWORD status, LPCTSTR pszLogFile)

Macro Definition Documentation

◆ ALLOC_ENTRY_NOT_FOUND

#define ALLOC_ENTRY_NOT_FOUND   0xFFFFFFFF

Definition at line 278 of file Stackwalker.cpp.

◆ ALLOC_HASH_ENTRIES

#define ALLOC_HASH_ENTRIES   8192

Definition at line 58 of file Stackwalker.cpp.

◆ gle

#define gle   (GetLastError())

Definition at line 1254 of file Stackwalker.cpp.

◆ HASH_ENTRY_REMOVE_AT_FREE

#define HASH_ENTRY_REMOVE_AT_FREE

Definition at line 44 of file Stackwalker.cpp.

◆ IGNORE_CRT_ALLOC

#define IGNORE_CRT_ALLOC

Definition at line 66 of file Stackwalker.cpp.

◆ IMGSYMLEN

#define IMGSYMLEN   ( sizeof IMAGEHLP_SYMBOL )

Definition at line 1257 of file Stackwalker.cpp.

◆ lenof

#define lenof ( a)
Value:
(sizeof(a) / sizeof((a)[0]))

Definition at line 1255 of file Stackwalker.cpp.

◆ LOG_FILE_MAX_SIZE

#define LOG_FILE_MAX_SIZE   1024*128

Definition at line 69 of file Stackwalker.cpp.

◆ MAX_EIP_LEN_BUF

#define MAX_EIP_LEN_BUF   4

Definition at line 276 of file Stackwalker.cpp.

◆ MAX_ESP_LEN_BUF

#define MAX_ESP_LEN_BUF   0x500

Definition at line 62 of file Stackwalker.cpp.

◆ MAX_MODULE_NAME32

#define MAX_MODULE_NAME32   255

Definition at line 1333 of file Stackwalker.cpp.

◆ MAXNAMELEN

#define MAXNAMELEN   1024

Definition at line 1256 of file Stackwalker.cpp.

◆ nNoMansLandSize

#define nNoMansLandSize   4

Definition at line 1009 of file Stackwalker.cpp.

◆ pbData

#define pbData ( pblock)
Value:
((unsigned char *)((_CrtMemBlockHeader *)pblock + 1))

Definition at line 1038 of file Stackwalker.cpp.

◆ pHdr

#define pHdr ( pbData)
Value:
(((_CrtMemBlockHeader *)pbData)-1)
#define pbData(pblock)

Definition at line 1039 of file Stackwalker.cpp.

◆ SYMOPT_LOAD_LINES

#define SYMOPT_LOAD_LINES   0x00000010

Definition at line 220 of file Stackwalker.cpp.

◆ TH32CS_SNAPMODULE

#define TH32CS_SNAPMODULE   0x00000008

Definition at line 1334 of file Stackwalker.cpp.

◆ TTBUFLEN

#define TTBUFLEN   8096

Definition at line 1258 of file Stackwalker.cpp.

◆ WITH_IMALLOC_SPY

#define WITH_IMALLOC_SPY

Definition at line 72 of file Stackwalker.cpp.

Function Documentation

◆ DeInitAllocCheck()

ULONG DeInitAllocCheck ( void )

Definition at line 2177 of file Stackwalker.cpp.

References DeInitAllocCheck().

◆ InitAllocCheck()

int InitAllocCheck ( eAllocCheckOutput eOutput,
BOOL bSetUnhandledExeptionFilter,
ULONG ulShowStackAtAlloc )

Definition at line 2138 of file Stackwalker.cpp.

References _MAX_PATH, _T, _tcscat, _tcscpy, ACOutput_XML, InitAllocCheck(), and InitAllocCheckWN().

◆ InitAllocCheckWN()

int InitAllocCheckWN ( eAllocCheckOutput eOutput,
LPCTSTR pszFileName,
ULONG ulShowStackAtAlloc )

Definition at line 2099 of file Stackwalker.cpp.

References _T, and InitAllocCheckWN().

◆ StackwalkFilter()

DWORD StackwalkFilter ( EXCEPTION_POINTERS * ep,
DWORD status,
LPCTSTR pszLogFile )