From b1c73532ee8997fe5dfbeb7d223027bdf99758a0 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sat, 9 Dec 2023 14:28:42 +0100 Subject: Vendor import of llvm-project main llvmorg-18-init-14265-ga17671084db1. --- lldb/source/Core/DumpDataExtractor.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'lldb/source/Core/DumpDataExtractor.cpp') 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); -- cgit v1.3