[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:58:50 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lldb
Author: woruyu (woruyu)
<details>
<summary>Changes</summary>
### Summary
This PR resolves https://github.com/llvm/llvm-project/issues/149316
---
Full diff: https://github.com/llvm/llvm-project/pull/149774.diff
1 Files Affected:
- (modified) lldb/tools/lldb-dap/JSONUtils.cpp (+9)
``````````diff
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));
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/149774
More information about the lldb-commits
mailing list