il.SizeOfStruct = sizeof(il);
if (!SymGetLineFromAddr64(dbg_curr_process->handle, linear, &disp, &il))
{
+#ifdef __arm__
+ dbg_printf("Unable to add breakpoint (unknown address %Ild)\n", linear);
+#else
dbg_printf("Unable to add breakpoint (unknown address %Ix)\n", linear);
+#endif
return;
}
filename = il.FileName;
{
case 4: case 2: case 1: break;
default:
+#ifdef __arm__
+ dbg_printf("Unsupported length (%I64lld) for watch-points, defaulting to 4\n", l);
+#else
dbg_printf("Unsupported length (%I64x) for watch-points, defaulting to 4\n", l);
+#endif
break;
}
}
case be_xpoint_watch_write:
dbg_printf("Stopped on watchpoint %d at ", dbg_curr_thread->stopped_xpoint);
print_address(addr, TRUE);
+#ifdef __arm__
+ dbg_printf(" new value %I64lld\n",
+#else
dbg_printf(" new value %I64x\n",
+#endif
dbg_curr_process->bp[dbg_curr_thread->stopped_xpoint].w.oldval);
}
return FALSE;
case Ilq:
len = db_lengths[rex & REX_W ? QUAD : LONG];
get_value_inc(imm64, loc, len, FALSE);
+#ifdef __arm__
+ db_printf("$%I64lld", imm64);
+#else
db_printf("$%#I64x", imm64);
+#endif
break;
case O:
dbg_printf("$%s", exp->un.intvar.name);
break;
case EXPR_TYPE_U_CONST:
+#ifdef __arm__
+ dbg_printf("%I64llu", exp->un.u_const.value);
+#else
dbg_printf("%I64u", exp->un.u_const.value);
+#endif
break;
case EXPR_TYPE_S_CONST:
+#ifdef __arm__
+ dbg_printf("%I64lld", exp->un.s_const.value);
+#else
dbg_printf("%I64d", exp->un.s_const.value);
+#endif
break;
case EXPR_TYPE_STRING:
dbg_printf("\"%s\"", exp->un.string.str);
static void module_print_info(const struct info_module *module, BOOL is_embedded)
{
+#ifdef __arm__
+ dbg_printf("%x_%x_%I64lld-%x_%x_%I64lld\t%-16s%s\n",
+#else
dbg_printf("%*.*I64x-%*.*I64x\t%-16s%s\n",
+#endif
ADDRWIDTH, ADDRWIDTH, module->mi.BaseOfImage,
ADDRWIDTH, ADDRWIDTH, module->mi.BaseOfImage + module->mi.ImageSize,
is_embedded ? "\\" : get_symtype_str(&module->mi), module->name);
HeapFree(GetProcessHeap(), 0, im.modules);
if (base && !num_printed)
+#ifdef __arm__
+ dbg_printf("'%x 0x%I64lld' is not a valid module address\n", ADDRWIDTH, base);
+#else
dbg_printf("'0x%0*I64x' is not a valid module address\n", ADDRWIDTH, base);
+#endif
}
struct class_walker
if (!GetWindowTextA(hWnd, wndName, sizeof(wndName)))
strcpy(wndName, "-- Empty --");
+#ifdef __arm__
+ dbg_printf("%x %s %Ild %x %s %-17.17s %08x %x %Ild %08x %.14s\n",
+#else
dbg_printf("%*s%08Ix%*s %-17.17s %08x %0*Ix %08x %.14s\n",
+#endif
indent, "", (DWORD_PTR)hWnd, 12 - indent, "",
clsName, GetWindowLongW(hWnd, GWL_STYLE),
ADDRWIDTH, (ULONG_PTR)GetWindowLongPtrW(hWnd, GWLP_WNDPROC),
/* FIXME missing fields: hmemTaskQ, hrgnUpdate, dce, flags, pProp, scroll */
dbg_printf("next=%p child=%p parent=%p owner=%p class='%s'\n"
+#ifdef __arm__
+ "inst=%p active=%p idmenu=%Ild\n"
+#else
"inst=%p active=%p idmenu=%08Ix\n"
+#endif
"style=0x%08x exstyle=0x%08x wndproc=%p text='%s'\n"
"client=%d,%d-%d,%d window=%d,%d-%d,%d sysmenu=%p\n",
GetWindow(hWnd, GW_HWNDNEXT),
type = "";
prot[0] = '\0';
}
+#ifdef __arm__
+ dbg_printf("%x %Ild %x %Ild %s %s %s\n",
+#else
dbg_printf("%0*Ix %0*Ix %s %s %s\n",
+#endif
ADDRWIDTH, (DWORD_PTR)addr, ADDRWIDTH, (DWORD_PTR)addr + mbi.RegionSize - 1, state, type, prot);
if (addr + mbi.RegionSize < addr) /* wrap around ? */
break;
break;
case EXCEPTION_ACCESS_VIOLATION:
if (rec->NumberParameters == 2)
+#ifdef __arm__
+ dbg_printf("page fault on %s access to %x 0x%Ild",
+#else
dbg_printf("page fault on %s access to 0x%0*Ix",
+#endif
rec->ExceptionInformation[0] == EXCEPTION_WRITE_FAULT ? "write" :
rec->ExceptionInformation[0] == EXCEPTION_EXECUTE_FAULT ? "execute" : "read",
ADDRWIDTH, rec->ExceptionInformation[1]);
break;
case EXCEPTION_WINE_CXX_EXCEPTION:
if(rec->NumberParameters == 3 && rec->ExceptionInformation[0] == EXCEPTION_WINE_CXX_FRAME_MAGIC)
+#ifdef __arm__
+ dbg_printf("C++ exception(object = %x 0x%Ild, type = %x 0x%Ild)",
+#else
dbg_printf("C++ exception(object = 0x%0*Ix, type = 0x%0*Ix)",
+#endif
ADDRWIDTH, rec->ExceptionInformation[1], ADDRWIDTH, rec->ExceptionInformation[2]);
else if(rec->NumberParameters == 4 && rec->ExceptionInformation[0] == EXCEPTION_WINE_CXX_FRAME_MAGIC)
dbg_printf("C++ exception(object = %p, type = %p, base = %p)",
(void*)rec->ExceptionInformation[1], (void*)rec->ExceptionInformation[2],
(void*)rec->ExceptionInformation[3]);
else
+#ifdef __arm__
+ dbg_printf("C++ exception with strange parameter count %d or magic %x 0x%0Ild",
+#else
dbg_printf("C++ exception with strange parameter count %d or magic 0x%0*Ix",
+#endif
rec->NumberParameters, ADDRWIDTH, rec->ExceptionInformation[0]);
break;
default:
case 'a':
if (sizeof(DWORD_PTR) == 4)
{
+#ifdef __arm__
+ DO_DUMP(DWORD_PTR, 4, " %Ild");
+#else
DO_DUMP(DWORD_PTR, 4, " %8.8Ix");
+#endif
}
else
{
+#ifdef __arm__
+ DO_DUMP(DWORD_PTR, 2, " %Ild");
+#else
DO_DUMP(DWORD_PTR, 2, " %16.16Ix");
+#endif
}
break;
case 'c': DO_DUMP2(char, 32, " %c", (_v < 0x20) ? ' ' : _v); break;
static void dbg_print_sdecimal(dbg_lgint_t sv)
{
+#ifdef __arm__
+ dbg_printf("%I64lld", sv);
+#else
dbg_printf("%I64d", sv);
+#endif
}
static void dbg_print_hex(DWORD size, dbg_lgint_t sv)
dbg_printf("0");
else
/* clear unneeded high bits, esp. sign extension */
+#ifdef __arm__
+ dbg_printf("%I64lld", sv & (~(dbg_lguint_t)0 >> (8 * (sizeof(dbg_lgint_t) - size))));
+#else
dbg_printf("%#I64x", sv & (~(dbg_lguint_t)0 >> (8 * (sizeof(dbg_lgint_t) - size))));
+#endif
}
static void print_typed_basic(const struct dbg_lvalue* lvalue)
if (SymFromAddr(dbg_curr_process->handle, lin, &disp64, si) && disp64 < si->Size)
{
dbg_printf(" %s", si->Name);
+#ifdef __arm__
+ if (disp64) dbg_printf("+0x%I64lld", disp64);
+#else
if (disp64) dbg_printf("+0x%I64x", disp64);
+#endif
}
else
{
if (!SymGetModuleInfo(dbg_curr_process->handle, lin, &im)) return;
dbg_printf(" %s", im.ModuleName);
if (lin > im.BaseOfImage)
+#ifdef __arm__
+ dbg_printf("+0x%Ild", lin - im.BaseOfImage);
+#else
dbg_printf("+0x%Ix", lin - im.BaseOfImage);
+#endif
}
if (with_line)
{
DWORD disp;
dbg_printf(" %s", si->Name);
+#ifdef __arm__
+ if (disp64) dbg_printf("+0x%I64lld", disp64);
+#else
if (disp64) dbg_printf("+0x%I64x", disp64);
+#endif
stack_set_local_scope();
se.first = TRUE;
dbg_printf(" [%s:%u]", il.FileName, il.LineNumber);
dbg_printf(" in %s", im.ModuleName);
}
+#ifdef __arm__
+ else dbg_printf(" in %s (+0x%Ild)", im.ModuleName, frm->linear_pc - im.BaseOfImage);
+#else
else dbg_printf(" in %s (+0x%Ix)", im.ModuleName, frm->linear_pc - im.BaseOfImage);
+#endif
}
/******************************************************************
addr.Mode = AddrModeFlat;
addr.Offset = frm->linear_pc;
print_address(&addr, FALSE);
+#ifdef __arm__
+ dbg_printf(": %x (%Ild)\n", ADDRWIDTH, frm->linear_frame);
+#else
dbg_printf(": (%0*Ix)\n", ADDRWIDTH, frm->linear_frame);
+#endif
SymEnumSymbols(dbg_curr_process->handle, 0, NULL, info_locals_cb, (void*)frm->linear_frame);
return TRUE;
mi.ModuleName[len - 5] = '\0';
}
+#ifdef __arm__
+ dbg_printf("%x %I64lld: %s!%s", ADDRWIDTH, sym->Address, mi.ModuleName, sym->Name);
+#else
dbg_printf("%0*I64x: %s!%s", ADDRWIDTH, sym->Address, mi.ModuleName, sym->Name);
+#endif
type.id = sym->TypeIndex;
type.module = sym->ModBase;
struct dbg_type type;
type.module = sym->ModBase;
type.id = sym->TypeIndex;
+#ifdef __arm__
+ dbg_printf("Mod: %x %Ild ID: %08x\n", ADDRWIDTH, type.module, type.id);
+#else
dbg_printf("Mod: %0*Ix ID: %08x\n", ADDRWIDTH, type.module, type.id);
+#endif
types_print_type(&type, TRUE);
dbg_printf("\n");
return TRUE;