Skip to content

Commit efee648

Browse files
santhoshe447Santhosh Kumar EllendulaSanthosh Kumar Ellendula
authored andcommitted
[lldb-dap] Enabling instruction breakpoint support to lldb-dap. (llvm#105278)
Added support for "supportsInstructionBreakpoints" capability and now it this command is triggered when we set instruction breakpoint. We need this support as part of enabling disassembly view debugging. Following features should work as part of this feature enablement: 1. Settings breakpoints in disassembly view: Unsetting the breakpoint is not happening from the disassembly view. Currently we need to unset breakpoint manually from the breakpoint List. Multiple breakpoints are getting set for the same $ 2. Step over, step into, continue in the disassembly view The format for DisassembleRequest and DisassembleResponse at https://raw.githubusercontent.com/microsoft/vscode/master/src/vs/workbench/contrib/debug/common/debugProtocol.d.ts . Ref Images: Set instruction breakpoint in disassembly view: ![image](https://github.com/user-attachments/assets/833bfb34-86f4-40e2-8c20-14b638a612a2) After issuing continue: ![image](https://github.com/user-attachments/assets/884572a3-915e-422b-b8dd-d132e5c00de6) --------- Co-authored-by: Santhosh Kumar Ellendula <[email protected]> Co-authored-by: Santhosh Kumar Ellendula <[email protected]> (cherry picked from commit 89c27d6)
1 parent 2634c07 commit efee648

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lldb/tools/lldb-dap/lldb-dap.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1988,6 +1988,8 @@ void request_initialize(const llvm::json::Object &request) {
19881988
body.try_emplace("supportsDataBreakpoints", true);
19891989
// The debug adapter supports the `readMemory` request.
19901990
body.try_emplace("supportsReadMemoryRequest", true);
1991+
// The debug adapter support for instruction breakpoint.
1992+
body.try_emplace("supportsInstructionBreakpoints", true);
19911993

19921994
// Put in non-DAP specification lldb specific information.
19931995
llvm::json::Object lldb_json;
@@ -4843,6 +4845,7 @@ void RegisterRequestCallbacks() {
48434845
g_dap.RegisterRequestCallback("locations", request_locations);
48444846
g_dap.RegisterRequestCallback("disassemble", request_disassemble);
48454847
g_dap.RegisterRequestCallback("readMemory", request_readMemory);
4848+
// Instruction breakpoint request
48464849
g_dap.RegisterRequestCallback("setInstructionBreakpoints",
48474850
request_setInstructionBreakpoints);
48484851
// Custom requests

0 commit comments

Comments
 (0)