[lldb] Fix a log format warning on Windows, don't assume uint64_t is a long type
authorMartin Storsjö <martin@martin.st>
Wed, 15 Feb 2023 08:42:20 +0000 (10:42 +0200)
committerMartin Storsjö <martin@martin.st>
Wed, 15 Feb 2023 12:44:17 +0000 (14:44 +0200)
On Windows, long is 32 bit, and uint64_t is long long.

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

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

index 06772aa..414e53f 100644 (file)
@@ -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};