]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb dap: introduce stopOnEntry option
authoroltolm <oleg.tolmatcev@gmail.com>
Mon, 2 Sep 2024 10:13:22 +0000 (12:13 +0200)
committerTom Tromey <tromey@adacore.com>
Fri, 13 Sep 2024 20:19:34 +0000 (14:19 -0600)
Approved-By: Tom Tromey <tom@tromey.com>
Reviewed-By: Eli Zaretskii <eliz@gnu.org>
gdb/doc/gdb.texinfo
gdb/python/lib/gdb/dap/launch.py

index 780eaf41f1619dbb4597ef229d0cd35e0d139c76..77a4021b36a4359e95ff0729a5c4405b467f5c52 100644 (file)
@@ -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
index df1f667237b04c5962ae64ec23f5fb7e4837a806..65444bf976a03ffe6d8ff0d927dd66adf63256d1 100644 (file)
@@ -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")