mirror of
https://github.com/intel/llvm.git
synced 2026-01-22 23:49:22 +08:00
Print out addresses with the correct width for 32 bit programs.
llvm-svn: 119786
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user