forked from OSchip/llvm-project
Print out addresses with the correct width for 32 bit programs.
llvm-svn: 119786
This commit is contained in:
parent
92ca933f6e
commit
35f1a0d58d
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue