[Lldb-commits] [lldb] 234e08e - [lldb] Fix format specifier warning in EmulateInstructionRISCV

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Fri Nov 4 10:47:03 PDT 2022


Author: Jonas Devlieghere
Date: 2022-11-04T10:46:31-07:00
New Revision: 234e08ec3c1a94bf67ee78c25d1c5241cc69aaa5

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

LOG: [lldb] Fix format specifier warning in EmulateInstructionRISCV

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

Added: 
    

Modified: 
    lldb/source/Plugins/Instruction/RISCV/EmulateInstructionRISCV.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Plugins/Instruction/RISCV/EmulateInstructionRISCV.cpp b/lldb/source/Plugins/Instruction/RISCV/EmulateInstructionRISCV.cpp
index 1d8f3a2750277..7b2f8c81e44bc 100644
--- a/lldb/source/Plugins/Instruction/RISCV/EmulateInstructionRISCV.cpp
+++ b/lldb/source/Plugins/Instruction/RISCV/EmulateInstructionRISCV.cpp
@@ -504,7 +504,7 @@ llvm::Optional<DecodeResult> EmulateInstructionRISCV::Decode(uint32_t inst) {
 
   for (const InstrPattern &pat : PATTERNS) {
     if ((inst & pat.type_mask) == pat.eigen) {
-      LLDB_LOGF(log, "EmulateInstructionRISCV::%s: inst(%x at %lx) was decoded to %s",
+      LLDB_LOGF(log, "EmulateInstructionRISCV::%s: inst(%x at %llx) was decoded to %s",
                 __FUNCTION__, inst, m_addr, pat.name);
       auto decoded = is_rvc ? pat.decode(try_rvc) : pat.decode(inst);
       return DecodeResult{decoded, inst, is_rvc, pat};


        


More information about the lldb-commits mailing list