diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2023-12-09 13:28:42 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2023-12-09 13:28:42 +0000 |
| commit | b1c73532ee8997fe5dfbeb7d223027bdf99758a0 (patch) | |
| tree | 7d6e51c294ab6719475d660217aa0c0ad0526292 /lldb/source/Core/DumpDataExtractor.cpp | |
| parent | 7fa27ce4a07f19b07799a767fc29416f3b625afb (diff) | |
Diffstat (limited to 'lldb/source/Core/DumpDataExtractor.cpp')
| -rw-r--r-- | lldb/source/Core/DumpDataExtractor.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/lldb/source/Core/DumpDataExtractor.cpp b/lldb/source/Core/DumpDataExtractor.cpp index cb76b118325b..986c9a181919 100644 --- a/lldb/source/Core/DumpDataExtractor.cpp +++ b/lldb/source/Core/DumpDataExtractor.cpp @@ -620,10 +620,17 @@ lldb::offset_t lldb_private::DumpDataExtractor( case 2: case 4: case 8: - s->Printf(wantsuppercase ? "0x%*.*" PRIX64 : "0x%*.*" PRIx64, - (int)(2 * item_byte_size), (int)(2 * item_byte_size), - DE.GetMaxU64Bitfield(&offset, item_byte_size, item_bit_size, - item_bit_offset)); + if (Target::GetGlobalProperties() + .ShowHexVariableValuesWithLeadingZeroes()) { + s->Printf(wantsuppercase ? "0x%*.*" PRIX64 : "0x%*.*" PRIx64, + (int)(2 * item_byte_size), (int)(2 * item_byte_size), + DE.GetMaxU64Bitfield(&offset, item_byte_size, item_bit_size, + item_bit_offset)); + } else { + s->Printf(wantsuppercase ? "0x%" PRIX64 : "0x%" PRIx64, + DE.GetMaxU64Bitfield(&offset, item_byte_size, item_bit_size, + item_bit_offset)); + } break; default: { assert(item_bit_size == 0 && item_bit_offset == 0); |
