Skip to content

Commit 3ba244c

Browse files
committed
[lldb-dap] Fix format string on Mac OS
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.
1 parent 318236d commit 3ba244c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lldb/tools/lldb-dap/Handler/AttachRequestHandler.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ Error AttachRequestHandler::Run(const AttachRequestArguments &args) const {
8787
// Use the unique target ID to get the target.
8888
target = dap.debugger.FindTargetByGloballyUniqueID(*target_id);
8989
if (!target.IsValid()) {
90-
error.SetErrorStringWithFormat("invalid target_id %lu in attach config",
91-
*target_id);
90+
error.SetErrorStringWithFormat("invalid target_id %llu in attach config",
91+
(unsigned long long)*target_id);
9292
}
9393
} else {
9494
target = dap.CreateTarget(error);

0 commit comments

Comments
 (0)