]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb/dap: allow some requests when the process is running
authoroltolm <oleg.tolmatcev@gmail.com>
Sun, 24 Nov 2024 17:39:13 +0000 (18:39 +0100)
committerTom Tromey <tromey@adacore.com>
Fri, 13 Dec 2024 16:48:00 +0000 (09:48 -0700)
It is impossible to set a breakpoint when the process is running,
which I find annoying. LLDB does not have this restriction. I made
`setBreakpoints` and `breakpointLocations` work when the process is
running. Probably more requests can be changed, but I only need these
two at the moment.

Approved-By: Tom Tromey <tom@tromey.com>
gdb/python/lib/gdb/dap/breakpoint.py
gdb/python/lib/gdb/dap/locations.py

index 15055f21b7bef761613de7d6d293e42b1f17d5e2..6adb826d2237b2676437503ab95d7d6f959c9118 100644 (file)
@@ -288,7 +288,7 @@ def _rewrite_src_breakpoint(
     }
 
 
-@request("setBreakpoints")
+@request("setBreakpoints", expect_stopped=False)
 @capability("supportsHitConditionalBreakpoints")
 @capability("supportsConditionalBreakpoints")
 @capability("supportsLogPoints")
index 967322fbeafaa6d63bdc197aa3d78f45cf6dff80..befb7bf25751eb09ca21c76a910a556414682ba5 100644 (file)
@@ -28,7 +28,7 @@ from .startup import exec_mi_and_log
 # This points out that fixing this would be an incompatibility but
 # goes on to propose "if arguments property is missing, debug adapters
 # should return an error".
-@request("breakpointLocations")
+@request("breakpointLocations", expect_stopped=False)
 @capability("supportsBreakpointLocationsRequest")
 def breakpoint_locations(*, source, line: int, endLine: Optional[int] = None, **extra):
     if endLine is None: