NCBI C++ ToolKit
Classes | Macros | Typedefs | Functions | Variables
ncbi_stack_win32.cpp File Reference
#include <ncbi_pch.hpp>
#include <corelib/ncbiapp_api.hpp>
#include <corelib/ncbidll.hpp>
#include <corelib/ncbi_safe_static.hpp>
#include <corelib/error_codes.hpp>
#include <windows.h>
#include <dbghelp.h>
+ Include dependency graph for ncbi_stack_win32.cpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Go to the SVN repository for this file.

Classes

struct  SModuleEntry
 
struct  tagMODULEENTRY32
 
struct  _MODULEINFO
 
class  CSymbolGuard
 
class  CStackTraceImpl
 

Macros

#define NCBI_USE_ERRCODE_X   Corelib_Stack
 
#define lenof(a)   (sizeof(a) / sizeof((a)[0]))
 
#define MAXNAMELEN   1024
 
#define IMGSYMLEN   (sizeof IMAGEHLP_SYMBOL)
 
#define TTBUFLEN   65535
 
#define MAX_MODULE_NAME32   255
 
#define TH32CS_SNAPMODULE   0x00000008
 
#define GET_CURRENT_CONTEXT(c, contextFlags)
 

Typedefs

typedef vector< SModuleEntryTModules
 
typedef TModules::iterator ModuleListIter
 
typedef struct tagMODULEENTRY32 MODULEENTRY32
 
typedef MODULEENTRY32PMODULEENTRY32
 
typedef MODULEENTRY32LPMODULEENTRY32
 
typedef struct _MODULEINFO MODULEINFO
 
typedef struct _MODULEINFOLPMODULEINFO
 

Functions

static bool s_FillModuleListTH32 (TModules &modules, DWORD pid)
 
static bool s_FillModuleListPSAPI (TModules &mods, DWORD pid, HANDLE hProcess)
 
static bool s_FillModuleList (TModules &modules, DWORD pid, HANDLE hProcess)
 

Variables

static CSafeStatic< CSymbolGuards_SymbolGuard
 

Macro Definition Documentation

◆ GET_CURRENT_CONTEXT

#define GET_CURRENT_CONTEXT (   c,
  contextFlags 
)
Value:
do { \
memset(&c, 0, sizeof(CONTEXT)); \
c.ContextFlags = contextFlags; \
__asm call x \
__asm x: pop eax \
__asm mov c.Eip, eax \
__asm mov c.Ebp, ebp \
__asm mov c.Esp, esp \
} while(0)

Definition at line 437 of file ncbi_stack_win32.cpp.

◆ IMGSYMLEN

#define IMGSYMLEN   (sizeof IMAGEHLP_SYMBOL)

Definition at line 51 of file ncbi_stack_win32.cpp.

◆ lenof

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

Definition at line 49 of file ncbi_stack_win32.cpp.

◆ MAX_MODULE_NAME32

#define MAX_MODULE_NAME32   255

Definition at line 69 of file ncbi_stack_win32.cpp.

◆ MAXNAMELEN

#define MAXNAMELEN   1024

Definition at line 50 of file ncbi_stack_win32.cpp.

◆ NCBI_USE_ERRCODE_X

#define NCBI_USE_ERRCODE_X   Corelib_Stack

Definition at line 43 of file ncbi_stack_win32.cpp.

◆ TH32CS_SNAPMODULE

#define TH32CS_SNAPMODULE   0x00000008

Definition at line 70 of file ncbi_stack_win32.cpp.

◆ TTBUFLEN

#define TTBUFLEN   65535

Definition at line 52 of file ncbi_stack_win32.cpp.

Typedef Documentation

◆ LPMODULEENTRY32

Definition at line 87 of file ncbi_stack_win32.cpp.

◆ LPMODULEINFO

typedef struct _MODULEINFO * LPMODULEINFO

◆ MODULEENTRY32

◆ MODULEINFO

typedef struct _MODULEINFO MODULEINFO

◆ ModuleListIter

typedef TModules::iterator ModuleListIter

Definition at line 64 of file ncbi_stack_win32.cpp.

◆ PMODULEENTRY32

Definition at line 86 of file ncbi_stack_win32.cpp.

◆ TModules

typedef vector<SModuleEntry> TModules

Definition at line 63 of file ncbi_stack_win32.cpp.

Function Documentation

◆ s_FillModuleList()

static bool s_FillModuleList ( TModules modules,
DWORD  pid,
HANDLE  hProcess 
)
static

Definition at line 293 of file ncbi_stack_win32.cpp.

References s_FillModuleListPSAPI(), and s_FillModuleListTH32().

Referenced by CSymbolGuard::UpdateSymbols().

◆ s_FillModuleListPSAPI()

static bool s_FillModuleListPSAPI ( TModules mods,
DWORD  pid,
HANDLE  hProcess 
)
static

◆ s_FillModuleListTH32()

static bool s_FillModuleListTH32 ( TModules modules,
DWORD  pid 
)
static

Variable Documentation

◆ s_SymbolGuard

CSafeStatic<CSymbolGuard> s_SymbolGuard
static

Definition at line 418 of file ncbi_stack_win32.cpp.

Modified on Thu Feb 29 12:21:30 2024 by modify_doxy.py rev. 669887