library of assembled shared sources

http://lass.cocamware.com

lass::util::impl::CrashDumpImpl Class Reference

Collaboration diagram for lass::util::impl::CrashDumpImpl:

Collaboration graph
[legend]

Public Types

enum  { bufferSize_ = _MAX_PATH, numPatchBytes_ = 5 }
typedef CrashDump::TCallback TCallback
typedef util::CriticalSection TMutex
typedef void(* TCallback )(const char *, void *)
typedef BOOL(WINAPI * TMiniDumpWriteDump )(HANDLE hProcess, DWORD ProcessId, HANDLE hFile, MINIDUMP_TYPE DumpType, CONST PMINIDUMP_EXCEPTION_INFORMATION ExceptionParam, CONST PMINIDUMP_USER_STREAM_INFORMATION UserStreamParam, CONST PMINIDUMP_CALLBACK_INFORMATION CallbackParam)

Public Member Functions

 CrashDumpImpl (const std::string &name, TCallback callback, void *callbackClosure)
void init ()
 ~CrashDumpImpl ()
 CrashDumpImpl (const std::string &name, TCallback callback, void *callbackClosure)
void init ()
 ~CrashDumpImpl ()
const HMODULE loadLibrary (const TCHAR *libraryName) const
const HMODULE loadSideLibrary (const TCHAR *libraryName, HMODULE me) const
void patchSetUnhandledExceptionFilter (bool patch)
void handlerThread ()
void doHandleException ()

Static Public Member Functions

static void writeMemory (void *dest, const void *source, size_t size)
static LONG WINAPI unhandledExceptionFilter (struct _EXCEPTION_POINTERS *exceptionInfo)

Data Fields

std::vector< char > dumpFilename_
std::vector< TCHAR > dumpFilenameT_
TCallback callback_
void * callbackClosure_
HMODULE dbghelp_
TMiniDumpWriteDump miniDumpWriteDump_
util::ScopedPtr< ThreadhandlerThread_
util::Condition handleCondition_
util::Condition resultCondition_
TMutexmutex_
LPTOP_LEVEL_EXCEPTION_FILTER oldFilter_
char oldBytes_ [numPatchBytes_]
_EXCEPTION_POINTERS * exceptionInfo_
DWORD threadId_
LONG handlerResult_
volatile bool isExiting_
volatile bool isHandlingException_

Static Public Attributes

static CrashDumpImplinstance_ = 0
static char patchBytes_ [numPatchBytes_] = { 0x33, 0xc0, 0xc2, 0x04, 0x00 }

Detailed Description

Definition at line 56 of file crash_dump.cpp.


Member Typedef Documentation

Definition at line 59 of file crash_dump.cpp.

Definition at line 204 of file crash_dump_win32.inl.

typedef void(* lass::util::impl::CrashDumpImpl::TCallback)(const char *, void *)

typedef BOOL(WINAPI * lass::util::impl::CrashDumpImpl::TMiniDumpWriteDump)(HANDLE hProcess, DWORD ProcessId, HANDLE hFile, MINIDUMP_TYPE DumpType, CONST PMINIDUMP_EXCEPTION_INFORMATION ExceptionParam, CONST PMINIDUMP_USER_STREAM_INFORMATION UserStreamParam, CONST PMINIDUMP_CALLBACK_INFORMATION CallbackParam)


Member Enumeration Documentation

anonymous enum

Enumerator:
bufferSize_ 
numPatchBytes_ 

Definition at line 194 of file crash_dump_win32.inl.


Constructor & Destructor Documentation

lass::util::impl::CrashDumpImpl::CrashDumpImpl ( const std::string &  name,
TCallback  callback,
void *  callbackClosure 
) [inline]

Definition at line 60 of file crash_dump.cpp.

lass::util::impl::CrashDumpImpl::~CrashDumpImpl (  )  [inline]

Definition at line 62 of file crash_dump.cpp.

lass::util::impl::CrashDumpImpl::CrashDumpImpl ( const std::string &  name,
TCallback  callback,
void *  callbackClosure 
) [inline]

lass::util::impl::CrashDumpImpl::~CrashDumpImpl (  )  [inline]


Member Function Documentation

void lass::util::impl::CrashDumpImpl::init (  )  [inline]

Definition at line 61 of file crash_dump.cpp.

Referenced by lass::util::CrashDump::CrashDump().

void lass::util::impl::CrashDumpImpl::init (  )  [inline]

const HMODULE lass::util::impl::CrashDumpImpl::loadLibrary ( const TCHAR *  libraryName  )  const [inline]

Definition at line 206 of file crash_dump_win32.inl.

References lass::dll::getLassInstance(), LASS_THROW, and loadSideLibrary().

Referenced by init().

const HMODULE lass::util::impl::CrashDumpImpl::loadSideLibrary ( const TCHAR *  libraryName,
HMODULE  me 
) const [inline]

Definition at line 235 of file crash_dump_win32.inl.

References bufferSize_.

Referenced by loadLibrary().

void lass::util::impl::CrashDumpImpl::patchSetUnhandledExceptionFilter ( bool  patch  )  [inline]

Definition at line 265 of file crash_dump_win32.inl.

References LASS_ENFORCE, numPatchBytes_, oldBytes_, patchBytes_, and writeMemory().

Referenced by init(), and ~CrashDumpImpl().

static void lass::util::impl::CrashDumpImpl::writeMemory ( void *  dest,
const void *  source,
size_t  size 
) [inline, static]

Definition at line 281 of file crash_dump_win32.inl.

Referenced by patchSetUnhandledExceptionFilter().

void lass::util::impl::CrashDumpImpl::handlerThread (  )  [inline]

void lass::util::impl::CrashDumpImpl::doHandleException (  )  [inline]

Definition at line 319 of file crash_dump_win32.inl.

References dumpFilenameT_, exceptionInfo_, handlerResult_, miniDumpWriteDump_, and threadId_.

Referenced by handlerThread().

static LONG WINAPI lass::util::impl::CrashDumpImpl::unhandledExceptionFilter ( struct _EXCEPTION_POINTERS *  exceptionInfo  )  [inline, static]


Field Documentation

Definition at line 366 of file crash_dump_win32.inl.

Referenced by CrashDumpImpl(), and handlerThread().

Definition at line 367 of file crash_dump_win32.inl.

Referenced by CrashDumpImpl(), and doHandleException().

Definition at line 368 of file crash_dump_win32.inl.

Referenced by handlerThread().

Definition at line 369 of file crash_dump_win32.inl.

Referenced by handlerThread().

Definition at line 370 of file crash_dump_win32.inl.

Referenced by init(), and ~CrashDumpImpl().

Definition at line 371 of file crash_dump_win32.inl.

Referenced by doHandleException(), and init().

Definition at line 372 of file crash_dump_win32.inl.

Referenced by init(), and ~CrashDumpImpl().

Definition at line 373 of file crash_dump_win32.inl.

Referenced by handlerThread(), unhandledExceptionFilter(), and ~CrashDumpImpl().

Definition at line 374 of file crash_dump_win32.inl.

Referenced by handlerThread(), and unhandledExceptionFilter().

Definition at line 375 of file crash_dump_win32.inl.

Referenced by init(), unhandledExceptionFilter(), and ~CrashDumpImpl().

LPTOP_LEVEL_EXCEPTION_FILTER lass::util::impl::CrashDumpImpl::oldFilter_

Definition at line 376 of file crash_dump_win32.inl.

Referenced by init(), and ~CrashDumpImpl().

Definition at line 377 of file crash_dump_win32.inl.

Referenced by patchSetUnhandledExceptionFilter().

Definition at line 379 of file crash_dump_win32.inl.

Referenced by doHandleException(), and unhandledExceptionFilter().

Definition at line 380 of file crash_dump_win32.inl.

Referenced by doHandleException(), and unhandledExceptionFilter().

Definition at line 381 of file crash_dump_win32.inl.

Referenced by doHandleException(), and unhandledExceptionFilter().

Definition at line 383 of file crash_dump_win32.inl.

Referenced by handlerThread(), init(), and ~CrashDumpImpl().

Definition at line 384 of file crash_dump_win32.inl.

Referenced by handlerThread(), and unhandledExceptionFilter().

char lass::util::impl::CrashDumpImpl::patchBytes_ = { 0x33, 0xc0, 0xc2, 0x04, 0x00 } [static]

Definition at line 387 of file crash_dump_win32.inl.

Referenced by patchSetUnhandledExceptionFilter().


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

Generated on Mon Nov 10 14:22:18 2008 for Library of Assembled Shared Sources by doxygen 1.5.7.1
SourceForge.net Logo