pull/5770/head
Craig Tiller 9 years ago
parent c9c0b8bf42
commit adf3a9d0b0
  1. 7
      test/core/util/test_config.c

@ -66,8 +66,8 @@ static unsigned seed(void) { return _getpid(); }
static void print_current_stack() { static void print_current_stack() {
typedef USHORT(WINAPI * CaptureStackBackTraceType)( typedef USHORT(WINAPI * CaptureStackBackTraceType)(
__in ULONG, __in ULONG, __out PVOID *, __out_opt PULONG); __in ULONG, __in ULONG, __out PVOID *, __out_opt PULONG);
CaptureStackBackTraceType func = (CaptureStackBackTraceType)( CaptureStackBackTraceType func = (CaptureStackBackTraceType)(GetProcAddress(
GetProcAddress(LoadLibrary(_T("kernel32.dll")), "RtlCaptureStackBackTrace")); LoadLibrary(_T("kernel32.dll")), "RtlCaptureStackBackTrace"));
if (func == NULL) return; // WOE 29.SEP.2010 if (func == NULL) return; // WOE 29.SEP.2010
@ -84,7 +84,8 @@ static void print_current_stack() {
process = GetCurrentProcess(); process = GetCurrentProcess();
SymInitialize(process, NULL, TRUE); SymInitialize(process, NULL, TRUE);
frames = (func)(0, MAX_CALLERS, callers_stack, NULL); frames = (func)(0, MAX_CALLERS, callers_stack, NULL);
symbol = (SYMBOL_INFOW *)calloc(sizeof(SYMBOL_INFOW) + 256 * sizeof(wchar_t), 1); symbol =
(SYMBOL_INFOW *)calloc(sizeof(SYMBOL_INFOW) + 256 * sizeof(wchar_t), 1);
symbol->MaxNameLen = 255; symbol->MaxNameLen = 255;
symbol->SizeOfStruct = sizeof(SYMBOL_INFOW); symbol->SizeOfStruct = sizeof(SYMBOL_INFOW);

Loading…
Cancel
Save