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

Martin Storsjö via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Feb 15 00:45:45 PST 2023


mstorsjo created this revision.
mstorsjo added reviewers: Emmmer, DavidSpickett, JDevlieghere, labath.
Herald added subscribers: luke, frasercrmck, luismarques, apazos, sameer.abuasal, s.egerton, Jim, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, niosHD, sabuasal, simoncook, johnrusso, rbar, asb.
Herald added a project: All.
mstorsjo requested review of this revision.
Herald added subscribers: pcwang-thead, MaskRay.
Herald added a project: LLDB.

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


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D144078

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


Index: lldb/source/Plugins/Instruction/RISCV/EmulateInstructionRISCV.cpp
===================================================================
--- lldb/source/Plugins/Instruction/RISCV/EmulateInstructionRISCV.cpp
+++ lldb/source/Plugins/Instruction/RISCV/EmulateInstructionRISCV.cpp
@@ -636,7 +636,7 @@
     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};


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D144078.497582.patch
Type: text/x-patch
Size: 761 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20230215/baddf941/attachment.bin>


More information about the lldb-commits mailing list