[Lldb-commits] [lldb] a8483b9 - [lldb] Fix a log format warning on Windows, don't assume uint64_t is a long type

Martin Storsjö via lldb-commits lldb-commits at lists.llvm.org
Wed Feb 15 04:44:46 PST 2023


Author: Martin Storsjö
Date: 2023-02-15T14:44:17+02:00
New Revision: a8483b9b30385807790882b3b770fa6d016a0aa4

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

LOG: [lldb] Fix a log format warning on Windows, don't assume uint64_t is a long type

On Windows, long is 32 bit, and uint64_t is long long.

Differential Revision: https://reviews.llvm.org/D144078

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 06772aaa6e17c..414e53fef7342 100644
--- a/lldb/source/Plugins/Instruction/RISCV/EmulateInstructionRISCV.cpp
+++ b/lldb/source/Plugins/Instruction/RISCV/EmulateInstructionRISCV.cpp
@@ -636,7 +636,7 @@ std::optional<DecodeResult> EmulateInstructionRISCV::Decode(uint32_t inst) {
     if ((inst & pat.type_mask) == pat.eigen &&
         (inst_type & pat.inst_type) != 0) {
       LLDB_LOGF(
-          log, "EmulateInstructionRISCV::%s: inst(%x at %lx) was decoded to %s",
+          log, "EmulateInstructionRISCV::%s: inst(%x at %" PRIx64 ") 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