[Lldb-commits] [lldb] e4f62da - [lldb] Sidestep -Wformat warning by using LLDB_LOG instead of LLDB_LOGF

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Mon Mar 20 10:32:09 PDT 2023


Author: Jonas Devlieghere
Date: 2023-03-20T10:32:02-07:00
New Revision: e4f62da8129d9632d77fd4db5cf8caede0a1e5a6

URL: https://github.com/llvm/llvm-project/commit/e4f62da8129d9632d77fd4db5cf8caede0a1e5a6
DIFF: https://github.com/llvm/llvm-project/commit/e4f62da8129d9632d77fd4db5cf8caede0a1e5a6.diff

LOG: [lldb] Sidestep -Wformat warning by using LLDB_LOG instead of LLDB_LOGF

Fixes warning: format specifies type 'unsigned long' but the argument
has type 'DataType' (aka 'unsigned long long') [-Wformat]

Added: 
    

Modified: 
    lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp
index c52caab3e735e..aa5d7f61dbfbb 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugAranges.cpp
@@ -76,8 +76,8 @@ void DWARFDebugAranges::Dump(Log *log) const {
   for (size_t i = 0; i < num_entries; ++i) {
     const RangeToDIE::Entry *entry = m_aranges.GetEntryAtIndex(i);
     if (entry)
-      LLDB_LOGF(log, "0x%8.8lx: [0x%" PRIx64 " - 0x%" PRIx64 ")", entry->data,
-                entry->GetRangeBase(), entry->GetRangeEnd());
+      LLDB_LOG(log, "{0:x8}: [{1:x16} - {2:x16})", entry->data,
+               entry->GetRangeBase(), entry->GetRangeEnd());
   }
 }
 


        


More information about the lldb-commits mailing list