[binutils-gdb] gdb dap: introduce stopOnEntry option
Tom Tromey
tromey@sourceware.org
Fri Sep 13 20:25:30 GMT 2024
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=1136616707c1ffa5f8a1f4c6fe7b3f60f094adf6
commit 1136616707c1ffa5f8a1f4c6fe7b3f60f094adf6
Author: oltolm <oleg.tolmatcev@gmail.com>
Date: Mon Sep 2 12:13:22 2024 +0200
gdb dap: introduce stopOnEntry option
Approved-By: Tom Tromey <tom@tromey.com>
Reviewed-By: Eli Zaretskii <eliz@gnu.org>
Diff:
---
gdb/doc/gdb.texinfo | 5 +++++
gdb/python/lib/gdb/dap/launch.py | 3 ++-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 780eaf41f16..77a4021b36a 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -39850,6 +39850,11 @@ corresponds to the @code{file} command. @xref{Files}.
If provided, this must be a boolean. When @samp{True}, @value{GDBN}
will set a temporary breakpoint at the program's main procedure, using
the same approach as the @code{start} command. @xref{Starting}.
+
+@item stopOnEntry
+If provided, this must be a boolean. When @samp{True}, @value{GDBN}
+will set a temporary breakpoint at the program's first instruction, using
+the same approach as the @code{starti} command. @xref{Starting}.
@end table
@value{GDBN} defines some parameters that can be passed to the
diff --git a/gdb/python/lib/gdb/dap/launch.py b/gdb/python/lib/gdb/dap/launch.py
index df1f667237b..65444bf976a 100644
--- a/gdb/python/lib/gdb/dap/launch.py
+++ b/gdb/python/lib/gdb/dap/launch.py
@@ -45,6 +45,7 @@ def launch(
args: Sequence[str] = (),
env: Optional[Mapping[str, str]] = None,
stopAtBeginningOfMainSubprogram: bool = False,
+ stopOnEntry: bool = False,
**extra,
):
if cwd is not None:
@@ -62,7 +63,7 @@ def launch(
for name, value in env.items():
inf.set_env(name, value)
expect_process("process")
- exec_and_expect_stop("run")
+ exec_and_expect_stop("starti" if stopOnEntry else "run")
@request("attach")
More information about the Gdb-cvs
mailing list