[Lldb-commits] [lldb] [lldb-dap] assembly breakpoints (PR #139969)
Ely Ronnen via lldb-commits
lldb-commits at lists.llvm.org
Mon May 19 12:30:34 PDT 2025
================
@@ -34,26 +36,22 @@ SourceRequestHandler::Run(const protocol::SourceArguments &args) const {
return llvm::make_error<DAPError>(
"invalid arguments, expected source.sourceReference to be set");
- lldb::SBProcess process = dap.target.GetProcess();
- // Upper 32 bits is the thread index ID
- lldb::SBThread thread =
- process.GetThreadByIndexID(GetLLDBThreadIndexID(source));
- // Lower 32 bits is the frame index
- lldb::SBFrame frame = thread.GetFrameAtIndex(GetLLDBFrameID(source));
- if (!frame.IsValid())
+ lldb::SBAddress address(source, dap.target);
+ if (!address.IsValid())
return llvm::make_error<DAPError>("source not found");
+ lldb::SBSymbol symbol = address.GetSymbol();
+
lldb::SBStream stream;
- lldb::SBExecutionContext exe_ctx(frame);
- lldb::SBSymbol symbol = frame.GetSymbol();
+ lldb::SBExecutionContext exe_ctx(dap.target);
if (symbol.IsValid()) {
----------------
eronnen wrote:
also here I'm not sure what it's needed for, isn't the `SBExecutionContext` sufficient currently?
https://github.com/llvm/llvm-project/pull/139969
More information about the lldb-commits
mailing list