aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/lib
diff options
context:
space:
mode:
authoroltolm <oleg.tolmatcev@gmail.com>2024-11-24 18:39:13 +0100
committerTom Tromey <tromey@adacore.com>2024-12-13 09:48:00 -0700
commit7336a8977d81b7b8c00f2e8ccb8a084afb33b19a (patch)
tree7a8443a305f5ea876013480f51d4af730d0c84cc /gdb/python/lib
parent83c1269833c88608dac27edf78afc335ca8dbff1 (diff)
downloadbinutils-7336a8977d81b7b8c00f2e8ccb8a084afb33b19a.zip
binutils-7336a8977d81b7b8c00f2e8ccb8a084afb33b19a.tar.gz
binutils-7336a8977d81b7b8c00f2e8ccb8a084afb33b19a.tar.bz2
gdb/dap: allow some requests when the process is running
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>
Diffstat (limited to 'gdb/python/lib')
-rw-r--r--gdb/python/lib/gdb/dap/breakpoint.py2
-rw-r--r--gdb/python/lib/gdb/dap/locations.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/gdb/python/lib/gdb/dap/breakpoint.py b/gdb/python/lib/gdb/dap/breakpoint.py
index 15055f2..6adb826 100644
--- a/gdb/python/lib/gdb/dap/breakpoint.py
+++ b/gdb/python/lib/gdb/dap/breakpoint.py
@@ -288,7 +288,7 @@ def _rewrite_src_breakpoint(
}
-@request("setBreakpoints")
+@request("setBreakpoints", expect_stopped=False)
@capability("supportsHitConditionalBreakpoints")
@capability("supportsConditionalBreakpoints")
@capability("supportsLogPoints")
diff --git a/gdb/python/lib/gdb/dap/locations.py b/gdb/python/lib/gdb/dap/locations.py
index 967322f..befb7bf 100644
--- a/gdb/python/lib/gdb/dap/locations.py
+++ b/gdb/python/lib/gdb/dap/locations.py
@@ -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: