[Lldb-commits] [lldb] [lldb-dap] Fixing a type encoding issue with dap Stopped events. (PR #72292)
John Harrison via lldb-commits
lldb-commits at lists.llvm.org
Tue Nov 14 10:05:55 PST 2023
https://github.com/ashgti created https://github.com/llvm/llvm-project/pull/72292
Previously the type of the breakpoint id in the Stopped event was a uint64_t, however thats the wrong type for a breakpoint id, which can cause encoding issues when internal breakpoints are hit.
>From 5077857569f4f6ed74feedc2afe58a1a576ce4eb Mon Sep 17 00:00:00 2001
From: John Harrison <harjohn at google.com>
Date: Tue, 14 Nov 2023 10:02:41 -0800
Subject: [PATCH] [lldb-dap] Fixing a type encoding issue with dap Stopped
events.
Previously the type of the breakpoint id in the Stopped event was a uint64_t, however thats the wrong type for a breakpoint id, which can cause encoding issues when internal breakpoints are hit.
---
lldb/tools/lldb-dap/JSONUtils.cpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lldb/tools/lldb-dap/JSONUtils.cpp b/lldb/tools/lldb-dap/JSONUtils.cpp
index 2023291729762f1..2b96c4f21aeb04d 100644
--- a/lldb/tools/lldb-dap/JSONUtils.cpp
+++ b/lldb/tools/lldb-dap/JSONUtils.cpp
@@ -953,9 +953,9 @@ llvm::json::Value CreateThreadStopped(lldb::SBThread &thread,
} else {
body.try_emplace("reason", "breakpoint");
char desc_str[64];
- uint64_t bp_id = thread.GetStopReasonDataAtIndex(0);
- uint64_t bp_loc_id = thread.GetStopReasonDataAtIndex(1);
- snprintf(desc_str, sizeof(desc_str), "breakpoint %" PRIu64 ".%" PRIu64,
+ break_id_t bp_id = thread.GetStopReasonDataAtIndex(0);
+ break_id_t bp_loc_id = thread.GetStopReasonDataAtIndex(1);
+ snprintf(desc_str, sizeof(desc_str), "breakpoint %" PRIo32 ".%" PRIo32,
bp_id, bp_loc_id);
body.try_emplace("hitBreakpointIds",
llvm::json::Array{llvm::json::Value(bp_id)});
More information about the lldb-commits
mailing list