/* backtrace_windows - backtrace displaying on windows platform */
/* This file is included by ex.c on need (windows x86) */
/* backtrace_windows - backtrace displaying on windows platform */
/* This file is included by ex.c on need (windows x86) */
- (fun_function_table_access_t) GetProcAddress(hlp_dbg_instance,
- "SymFunctionTableAccess");
+ (fun_function_table_access_t) GetProcAddress(hlp_dbg_instance,
+ "SymFunctionTableAccess");
backtrace_syms = backtrace_symbols(e->bt, e->used);
e->bt_strings = NULL;
/* parse the output and build a new backtrace */
e->bt_strings = xbt_new(char *, e->used);
backtrace_syms = backtrace_symbols(e->bt, e->used);
e->bt_strings = NULL;
/* parse the output and build a new backtrace */
e->bt_strings = xbt_new(char *, e->used);
- byte
- __buffer[(sizeof(SYMBOL_INFO) + MAX_SYM_NAME * sizeof(TCHAR) +
- sizeof(ULONG64) - 1) / sizeof(ULONG64)];
+ byte __buffer[(sizeof(SYMBOL_INFO) + MAX_SYM_NAME * sizeof(TCHAR) +
+ sizeof(ULONG64) - 1) / sizeof(ULONG64)];
CONTEXT context = { CONTEXT_FULL };
GetThreadContext(GetCurrentThread(), &context);
CONTEXT context = { CONTEXT_FULL };
GetThreadContext(GetCurrentThread(), &context);
/* ebp points on stack base */
/* esp points on stack pointer, ie on last stacked element (current element) */
_asm call $ + 5
/* ebp points on stack base */
/* esp points on stack pointer, ie on last stacked element (current element) */
_asm call $ + 5
- _asm pop eax
- _asm mov context.Eip, eax
- _asm mov eax, esp
- _asm mov context.Esp, eax
- _asm mov context.Ebp, ebp
- if ((NULL == hlp_dbg_instance) || (size <= 0) || (NULL == buffer)) {
+ _asm pop eax
+ _asm mov context.Eip, eax
+ _asm mov eax, esp
+ _asm mov context.Esp, eax
+ _asm mov context.Ebp, ebp
+ if ((NULL == hlp_dbg_instance) || (size <= 0) || (NULL == buffer)) {
unsigned long offset = 0;
IMAGEHLP_LINE line_info = { 0 };
IMAGEHLP_MODULE module = { 0 };
unsigned long offset = 0;
IMAGEHLP_LINE line_info = { 0 };
IMAGEHLP_MODULE module = { 0 };
- byte
- __buffer[(sizeof(SYMBOL_INFO) + MAX_SYM_NAME * sizeof(TCHAR) +
- sizeof(ULONG64) - 1) / sizeof(ULONG64)];
+ byte __buffer[(sizeof(SYMBOL_INFO) + MAX_SYM_NAME * sizeof(TCHAR) +
+ sizeof(ULONG64) - 1) / sizeof(ULONG64)];
(process_handle, stack_frame->AddrPC.Offset, &offset, pSym)) {
(process_handle, stack_frame->AddrPC.Offset, &offset, pSym)) {
- if ((*fun_get_line_from_addr)
- (process_handle, stack_frame->AddrPC.Offset, &offset, &line_info)) {
+ if (fun_get_line_from_addr
+ (process_handle, stack_frame->AddrPC.Offset, &offset,
+ &line_info)) {
- bprintf("** In %s() at %s:%d", pSym->Name, line_info.FileName,
- (int) line_info.LineNumber);
+ bprintf("** In %s() at %s:%d", pSym->Name,
+ line_info.FileName, (int) line_info.LineNumber);