llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-lldb Author: Dave Lee (kastiglione) <details> <summary>Changes</summary> --- Full diff: https://github.com/llvm/llvm-project/pull/81196.diff 1 Files Affected: - (modified) lldb/source/Core/FormatEntity.cpp (+23-2) ``````````diff diff --git a/lldb/source/Core/FormatEntity.cpp b/lldb/source/Core/FormatEntity.cpp index fa5eadc6ff4e9a..0e929203935304 100644 --- a/lldb/source/Core/FormatEntity.cpp +++ b/lldb/source/Core/FormatEntity.cpp @@ -883,8 +883,29 @@ static bool DumpValue(Stream &s, const SymbolContext *sc, } if (!is_array_range) { - LLDB_LOGF(log, - "[Debugger::FormatPrompt] dumping ordinary printable output"); + if (!entry.printf_format.empty()) { + auto type_info = target->GetTypeInfo(); + if (type_info & eTypeIsInteger) { + if (type_info & eTypeIsSigned) { + bool success = false; + auto integer = target->GetValueAsSigned(0, &success); + if (success) { + LLDB_LOGF(log, "dumping using printf format"); + s.Printf(entry.printf_format.c_str(), integer); + return true; + } + } else { + bool success = false; + auto integer = target->GetValueAsUnsigned(0, &success); + if (success) { + LLDB_LOGF(log, "dumping using printf format"); + s.Printf(entry.printf_format.c_str(), integer); + return true; + } + } + } + } + LLDB_LOGF(log, "dumping ordinary printable output"); return target->DumpPrintableRepresentation(s, val_obj_display, custom_format); } else { `````````` </details> https://github.com/llvm/llvm-project/pull/81196 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits