Print out addresses with the correct width for 32 bit programs.

llvm-svn: 119786
This commit is contained in:
Greg Clayton 2010-11-19 04:16:11 +00:00
parent 92ca933f6e
commit 35f1a0d58d
1 changed files with 6 additions and 1 deletions

View File

@ -1138,7 +1138,12 @@ Debugger::FormatPrompt
if (vaddr != LLDB_INVALID_ADDRESS)
{
s.Printf("0x%16.16llx", vaddr);
int addr_width = 0;
if (exe_ctx && exe_ctx->process)
addr_width = exe_ctx->process->GetAddressByteSize() * 2;
if (addr_width == 0)
addr_width = 16;
s.Printf("0x%*.*llx", addr_width, addr_width, vaddr);
var_success = true;
}
}