aboutsummaryrefslogtreecommitdiff
path: root/gdb/doc
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2017-09-11 14:57:37 -0700
committerJohn Baldwin <jhb@FreeBSD.org>2017-09-19 12:15:35 -0700
commit4e5a4f5850487740eb7549f1d0b8625ce577faab (patch)
tree0c55f26272032824250d95c45865592c340ccd52 /gdb/doc
parentb7f54058d9cd409ada192bfefd4c99c98caaef2e (diff)
downloadgdb-4e5a4f5850487740eb7549f1d0b8625ce577faab.zip
gdb-4e5a4f5850487740eb7549f1d0b8625ce577faab.tar.gz
gdb-4e5a4f5850487740eb7549f1d0b8625ce577faab.tar.bz2
Add a 'starti' command.
This works like 'start' but it stops at the first instruction rather than the first line in main(). This is useful if one wants to single step through runtime linker startup. While here, introduce a RUN_ARGS_HELP macro for shared help text between run, start, and starti. This includes expanding the help for start and starti to include details from run's help text. gdb/ChangeLog: * NEWS (Changes since GDB 8.0): Add starti. * infcmd.c (enum run_break): New. (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN case. (run_command): Use enum run_how. (start_command): Likewise. (starti_command): New function. (RUN_ARGS_HELP): New macro. (_initialize_infcmd): Use RUN_ARGS_HELP for run and start commands. Add starti command. gdb/doc/ChangeLog: * gdb.texinfo (Starting your Program): Add description of starti command. Mention starti command as an alternative for debugging the elaboration phase. gdb/testsuite/ChangeLog: * gdb.base/starti.c: New file. * gdb.base/starti.exp: New file. * lib/gdb.exp (gdb_starti_cmd): New procedure.
Diffstat (limited to 'gdb/doc')
-rw-r--r--gdb/doc/ChangeLog6
-rw-r--r--gdb/doc/gdb.texinfo18
2 files changed, 20 insertions, 4 deletions
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index aaec840..971f0c1 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,3 +1,9 @@
+2017-09-19 John Baldwin <jhb@FreeBSD.org>
+
+ * gdb.texinfo (Starting your Program): Add description of
+ starti command. Mention starti command as an alternative for
+ debugging the elaboration phase.
+
2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
* gdb.texinfo (Maintenance Commands): Document filter parameter
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index af5fe6f..d50a1fd 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -2117,10 +2117,20 @@ reused if no argument is provided during subsequent calls to
@samp{start} or @samp{run}.
It is sometimes necessary to debug the program during elaboration. In
-these cases, using the @code{start} command would stop the execution of
-your program too late, as the program would have already completed the
-elaboration phase. Under these circumstances, insert breakpoints in your
-elaboration code before running your program.
+these cases, using the @code{start} command would stop the execution
+of your program too late, as the program would have already completed
+the elaboration phase. Under these circumstances, either insert
+breakpoints in your elaboration code before running your program or
+use the @code{starti} command.
+
+@kindex starti
+@item starti
+@cindex run to first instruction
+The @samp{starti} command does the equivalent of setting a temporary
+breakpoint at the first instruction of a program's execution and then
+invoking the @samp{run} command. For programs containing an
+elaboration phase, the @code{starti} command will stop execution at
+the start of the elaboration phase.
@anchor{set exec-wrapper}
@kindex set exec-wrapper