parent
004827afdc
commit
900e26f651
|
@ -579,11 +579,11 @@ namespace {
|
||||||
return;
|
return;
|
||||||
const HANDLE hProcess = GetCurrentProcess();
|
const HANDLE hProcess = GetCurrentProcess();
|
||||||
const HANDLE hThread = GetCurrentThread();
|
const HANDLE hThread = GetCurrentThread();
|
||||||
BOOL result = pSymInitialize(
|
pSymInitialize(
|
||||||
hProcess,
|
hProcess,
|
||||||
nullptr,
|
nullptr,
|
||||||
TRUE
|
TRUE
|
||||||
);
|
);
|
||||||
CONTEXT context = *(ex->ContextRecord);
|
CONTEXT context = *(ex->ContextRecord);
|
||||||
STACKFRAME64 stack= {0};
|
STACKFRAME64 stack= {0};
|
||||||
#ifdef _M_IX86
|
#ifdef _M_IX86
|
||||||
|
@ -607,22 +607,22 @@ namespace {
|
||||||
DWORD64 displacement = 0;
|
DWORD64 displacement = 0;
|
||||||
int beyond_main=-1; // emergency exit, see below
|
int beyond_main=-1; // emergency exit, see below
|
||||||
for (ULONG frame = 0; ; frame++) {
|
for (ULONG frame = 0; ; frame++) {
|
||||||
result = pStackWalk64
|
BOOL result = pStackWalk64
|
||||||
(
|
(
|
||||||
#ifdef _M_IX86
|
#ifdef _M_IX86
|
||||||
IMAGE_FILE_MACHINE_I386,
|
IMAGE_FILE_MACHINE_I386,
|
||||||
#else
|
#else
|
||||||
IMAGE_FILE_MACHINE_AMD64,
|
IMAGE_FILE_MACHINE_AMD64,
|
||||||
#endif
|
#endif
|
||||||
hProcess,
|
hProcess,
|
||||||
hThread,
|
hThread,
|
||||||
&stack,
|
&stack,
|
||||||
&context,
|
&context,
|
||||||
nullptr,
|
nullptr,
|
||||||
pSymFunctionTableAccess64,
|
pSymFunctionTableAccess64,
|
||||||
pSymGetModuleBase64,
|
pSymGetModuleBase64,
|
||||||
nullptr
|
nullptr
|
||||||
);
|
);
|
||||||
if (!result) // official end...
|
if (!result) // official end...
|
||||||
break;
|
break;
|
||||||
pSymGetSymFromAddr64(hProcess, (ULONG64)stack.AddrPC.Offset, &displacement, &symbol);
|
pSymGetSymFromAddr64(hProcess, (ULONG64)stack.AddrPC.Offset, &displacement, &symbol);
|
||||||
|
|
Loading…
Reference in New Issue