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
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to