Skip to content

Commit 21f98f9

Browse files
authored
[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.
1 parent d33d7ce commit 21f98f9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,10 @@ 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.SetErrorString(
91+
llvm::formatv("invalid target_id {0} in attach config", *target_id)
92+
.str()
93+
.c_str());
9294
}
9395
} else {
9496
target = dap.CreateTarget(error);

0 commit comments

Comments
 (0)