Author: Nicolas Miller Date: 2025-12-03T15:33:51-08:00 New Revision: 21f98f978c65d5f98cc1453adbdb86c36fda1fd5
URL: https://github.com/llvm/llvm-project/commit/21f98f978c65d5f98cc1453adbdb86c36fda1fd5 DIFF: https://github.com/llvm/llvm-project/commit/21f98f978c65d5f98cc1453adbdb86c36fda1fd5.diff LOG: [lldb-dap] Fix format string on Mac OS (#169933) On Mac `unsigned long long` corresponds to `uint64_t` so `%llu` is needed. Simply always using `%llu` and upcasting to `unsigned long long` should make it work fine. Added: Modified: lldb/tools/lldb-dap/Handler/AttachRequestHandler.cpp Removed: ################################################################################ diff --git a/lldb/tools/lldb-dap/Handler/AttachRequestHandler.cpp b/lldb/tools/lldb-dap/Handler/AttachRequestHandler.cpp index 24c0ca2111f40..f0996eb3ff0f4 100644 --- a/lldb/tools/lldb-dap/Handler/AttachRequestHandler.cpp +++ b/lldb/tools/lldb-dap/Handler/AttachRequestHandler.cpp @@ -87,8 +87,10 @@ Error AttachRequestHandler::Run(const AttachRequestArguments &args) const { // Use the unique target ID to get the target. target = dap.debugger.FindTargetByGloballyUniqueID(*target_id); if (!target.IsValid()) { - error.SetErrorStringWithFormat("invalid target_id %lu in attach config", - *target_id); + error.SetErrorString( + llvm::formatv("invalid target_id {0} in attach config", *target_id) + .str() + .c_str()); } } else { target = dap.CreateTarget(error); _______________________________________________ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
