clayborg requested changes to this revision. clayborg added a comment. This revision now requires changes to proceed.
Very nice, just need to add a VSCode::SetTarget(...) as detailed in inlined comments and this will be good to go. ================ Comment at: lldb/tools/lldb-vscode/lldb-vscode.cpp:113 +void AddBreakpointListener(VSCode &vscode) { + // Configure breakpoint event listeners for the target. ---------------- Better to add a: ``` void VSCode::SetTarget(lldb::SBTarget target) ``` and this to that function ================ Comment at: lldb/tools/lldb-vscode/lldb-vscode.cpp:539 + lldb::SBError status; + g_vsc.target = g_vsc.debugger.CreateTarget( + program.data(), ---------------- Add a SetTarget() to the g_vsc struct definition and do the breakpoint listening there if the target is valid? ================ Comment at: lldb/tools/lldb-vscode/lldb-vscode.cpp:562 + AddBreakpointListener(g_vsc); + ---------------- Move to VSCode::SetTarget(lldb::SBTarget) function to avoid having to do this in two functions. ================ Comment at: lldb/tools/lldb-vscode/lldb-vscode.cpp:1408 + lldb::SBError status; + g_vsc.target = g_vsc.debugger.CreateTarget( + program.data(), ---------------- call g_vsc.SetTarget(g_vsc.debugger.CreateTarget(...)) ================ Comment at: lldb/tools/lldb-vscode/lldb-vscode.cpp:1431 + + AddBreakpointListener(g_vsc); + ---------------- This will be in VSCode::SetTarget, remove. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70847/new/ https://reviews.llvm.org/D70847 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits