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 <harj...@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)});

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to