summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lldb/source/Core/Debugger.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/lldb/source/Core/Debugger.cpp b/lldb/source/Core/Debugger.cpp
index ebdd8027a64..617edd2fdf4 100644
--- a/lldb/source/Core/Debugger.cpp
+++ b/lldb/source/Core/Debugger.cpp
@@ -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;
}
}
OpenPOWER on IntegriCloud