-
Notifications
You must be signed in to change notification settings - Fork 14.6k
[lldb-dap] support moduleId in the stackTrace response #149774
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
@llvm/pr-subscribers-lldb Author: woruyu (woruyu) ChangesSummaryThis PR resolves #149316 Full diff: https://github.com/llvm/llvm-project/pull/149774.diff 1 Files Affected:
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));
}
|
@da-viper , I added |
2d48be5
to
3c47de2
Compare
✅ With the latest revision this PR passed the Python code formatter. |
It should go into llvm-project/lldb/test/API/tools/lldb-dap/stackTrace/TestDAP_stackTrace.py Lines 29 to 31 in e94bc16
Not that I am aware of, you can look at LLDB_DAP logs (you need to set a log path) when running the DAP adapter or looking at the logs in a failed test. |
You can either use the |
Summary
This PR resolves #149316