Commit 3a869c1f authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

winedbg: Simplify some printing of addresses.

parent ad8b1074
......@@ -1603,10 +1603,7 @@ db_disasm(db_addr_t loc, boolean_t altfmt)
case Ilq:
len = db_lengths[rex & REX_W ? QUAD : LONG];
get_value_inc(imm64, loc, len, FALSE);
if (imm64 >> 32)
db_printf("$0x%x%08x", (DWORD)(imm64 >> 32), (DWORD)imm64);
else
db_printf("$%#x", (DWORD)imm64);
db_printf("$%#I64x", imm64);
break;
case O:
......
......@@ -284,7 +284,7 @@ void info_win32_module(DWORD64 base)
HeapFree(GetProcessHeap(), 0, im.modules);
if (base && !num_printed)
dbg_printf("'0x%x%08x' is not a valid module address\n", (DWORD)(base >> 32), (DWORD)base);
dbg_printf("'0x%0*I64x' is not a valid module address\n", ADDRWIDTH, base);
}
struct class_walker
......
......@@ -336,10 +336,8 @@ static void dbg_print_hex(DWORD size, ULONGLONG sv)
{
if (!sv)
dbg_printf("0");
else if (size > 4 && (sv >> 32))
dbg_printf("0x%x%08x", (DWORD)(sv >> 32), (DWORD)sv);
else
dbg_printf("0x%x", (DWORD)sv);
dbg_printf("%#I64x", sv);
}
static void print_typed_basic(const struct dbg_lvalue* lvalue)
......@@ -595,7 +593,7 @@ void print_address(const ADDRESS64* addr, BOOLEAN with_line)
si->MaxNameLen = 256;
if (!SymFromAddr(dbg_curr_process->handle, (DWORD_PTR)lin, &disp64, si)) return;
dbg_printf(" %s", si->Name);
if (disp64) dbg_printf("+0x%lx", (DWORD_PTR)disp64);
if (disp64) dbg_printf("+0x%I64x", disp64);
if (with_line)
{
IMAGEHLP_LINE64 il;
......
......@@ -286,7 +286,7 @@ static void stack_print_addr_and_args(int nf)
DWORD disp;
dbg_printf(" %s", si->Name);
if (disp64) dbg_printf("+0x%lx", (DWORD_PTR)disp64);
if (disp64) dbg_printf("+0x%I64x", disp64);
SymSetContext(dbg_curr_process->handle, &ihsf, NULL);
se.first = TRUE;
......@@ -301,8 +301,8 @@ static void stack_print_addr_and_args(int nf)
dbg_printf(" [%s:%u]", il.FileName, il.LineNumber);
dbg_printf(" in %s", im.ModuleName);
}
else dbg_printf(" in %s (+0x%lx)",
im.ModuleName, (DWORD_PTR)(ihsf.InstructionOffset - im.BaseOfImage));
else dbg_printf(" in %s (+0x%I64x)",
im.ModuleName, ihsf.InstructionOffset - im.BaseOfImage);
}
/******************************************************************
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment