diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2012-03-19 18:19:26 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2012-03-19 18:19:26 +0000 |
commit | 8320cc4fa3784dc5296745898de5357559f8125a (patch) | |
tree | 0e1f2bded27be2397ac4a559118b7e25b34a1352 /gdb/doc | |
parent | 26743505e35f0442b8db1848140d2e3d475fa736 (diff) | |
download | gdb-8320cc4fa3784dc5296745898de5357559f8125a.zip gdb-8320cc4fa3784dc5296745898de5357559f8125a.tar.gz gdb-8320cc4fa3784dc5296745898de5357559f8125a.tar.bz2 |
gdb/
* NEWS: Describe new options --init-command=FILE, -ix and
--init-eval-command=COMMAND, -iex.
* main.c (struct cmdarg): New enum items CMDARG_INIT_FILE and
CMDARG_INIT_COMMAND.
(captured_main): New enum items OPT_IX and OPT_IEX. Add
"init-command", "init-eval-command", "ix" and "iex" to the variable
long_options. Handle OPT_IX and OPT_IEX. Process them from CMDARG_VEC.
New comment for CMDARG_FILE and CMDARG_COMMAND processing.
(print_gdb_help): Describe --init-command=FILE, -ix and
--init-eval-command=COMMAND, -iex.
gdb/doc/
* gdb.texinfo (File Options): Describe --init-command=FILE, -ix and
--init-eval-command=COMMAND, -iex.
(Startup): Describe -iex and -ix. Simplify the example
for "set auto-load-scripts off".
gdb/testsuite/
* gdb.gdb/selftest.exp (do_steps_and_nexts): New entry
for cmdarg_vec = NULL. Remove entries for cmdsize = 1, cmdarg = and
ncmd = 0. New entry for VEC_cleanup cmdarg_s.
Diffstat (limited to 'gdb/doc')
-rw-r--r-- | gdb/doc/ChangeLog | 7 | ||||
-rw-r--r-- | gdb/doc/gdb.texinfo | 32 |
2 files changed, 33 insertions, 6 deletions
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index cb6d0e9..92e3e1b 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -1,3 +1,10 @@ +2012-03-19 Jan Kratochvil <jan.kratochvil@redhat.com> + + * gdb.texinfo (File Options): Describe --init-command=FILE, -ix and + --init-eval-command=COMMAND, -iex. + (Startup): Describe -iex and -ix. Simplify the example + for "set auto-load-scripts off". + 2012-03-16 Gary Benson <gbenson@redhat.com> PR breakpoints/10738 diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 56bf5d5..677af3b 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -990,6 +990,22 @@ also be interleaved with @samp{-command} as required. -x setbreakpoints -ex 'run' a.out @end smallexample +@item -init-command @var{file} +@itemx -ix @var{file} +@cindex @code{--init-command} +@cindex @code{-ix} +Execute commands from file @var{file} before loading gdbinit files or the +inferior. +@xref{Startup}. + +@item -init-eval-command @var{command} +@itemx -iex @var{command} +@cindex @code{--init-eval-command} +@cindex @code{-iex} +Execute a single @value{GDBN} command before loading gdbinit files or the +inferior. +@xref{Startup}. + @item -directory @var{directory} @itemx -d @var{directory} @cindex @code{--directory} @@ -1242,6 +1258,13 @@ Sets up the command interpreter as specified by the command line (@pxref{Mode Options, interpreter}). @item +Executes commands and command files specified by the @samp{-iex} and +@samp{-ix} options in their specified order. Usually you should use the +@samp{-ex} and @samp{-x} options instead, but this way you can apply +settings before @value{GDBN} init files get executed and before inferior +gets loaded. + +@item @cindex init file Reads the system-wide @dfn{init file} (if @option{--with-system-gdbinit} was used when building @value{GDBN}; @pxref{System-wide configuration, @@ -1275,14 +1298,11 @@ If you wish to disable the auto-loading during startup, you must do something like the following: @smallexample -$ gdb -ex "set auto-load-scripts off" -ex "file myprogram" +$ gdb -iex "set auto-load-scripts off" myprogram @end smallexample -The following does not work because the auto-loading is turned off too late: - -@smallexample -$ gdb -ex "set auto-load-scripts off" myprogram -@end smallexample +Option @samp{-ex} does not work because the auto-loading is then turned +off too late. @item Executes commands and command files specified by the @samp{-ex} and |