[Lldb-commits] [lldb] [lldb-dap] support moduleId in the stackTrace response (PR #149774)
via lldb-commits
lldb-commits at lists.llvm.org
Mon Jul 21 00:57:57 PDT 2025
https://github.com/woruyu created https://github.com/llvm/llvm-project/pull/149774
### Summary
This PR resolves https://github.com/llvm/llvm-project/issues/149316
>From 33c94346ac2b96d9f68fd1b8d62aebfa7b273499 Mon Sep 17 00:00:00 2001
From: woruyu <1214539920 at qq.com>
Date: Mon, 21 Jul 2025 15:52:50 +0800
Subject: [PATCH] [lldb-dap] support moduleId in the stackTrace response
---
lldb/tools/lldb-dap/JSONUtils.cpp | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/lldb/tools/lldb-dap/JSONUtils.cpp b/lldb/tools/lldb-dap/JSONUtils.cpp
index 41ca29a405ac9..7abd9618cc71f 100644
--- a/lldb/tools/lldb-dap/JSONUtils.cpp
+++ b/lldb/tools/lldb-dap/JSONUtils.cpp
@@ -550,6 +550,15 @@ llvm::json::Value CreateStackFrame(DAP &dap, lldb::SBFrame &frame,
if (frame.IsArtificial() || frame.IsHidden())
object.try_emplace("presentationHint", "subtle");
+ lldb::SBModule module = frame.GetModule();
+ if (module.IsValid()) {
+ std::string uuid = module.GetUUIDString();
+ if (!uuid.empty())
+ object.try_emplace("moduleId", uuid);
+ else
+ object.try_emplace("moduleId", module.GetFileSpec().GetFilename());
+ }
+
return llvm::json::Value(std::move(object));
}
More information about the lldb-commits
mailing list