This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: RFC: GDB as a loader 3/3: --eval-command option
- From: Andrew STUBBS <andrew dot stubbs at st dot com>
- To: GDB List <gdb at sources dot redhat dot com>
- Date: Fri, 28 Oct 2005 12:08:02 +0100
- Subject: Re: RFC: GDB as a loader 3/3: --eval-command option
- References: <4354DD31.3020809@st.com>
Here is a documentation patch for the --eval-command option.
I am not sure this is the right place in the manual. It is not a 'file'
option as such, but nor is it a 'mode' option, and I want to put it
alongside -command.
Andrew Stubbs
2005-10-28 Andrew Stubbs <andrew.stubbs@st.com>
* gdb.texinfo (Choosing files): Add --eval-command.
Index: src/gdb/doc/gdb.texinfo
===================================================================
--- src.orig/gdb/doc/gdb.texinfo 2005-10-28 11:35:18.000000000 +0100
+++ src/gdb/doc/gdb.texinfo 2005-10-28 11:59:02.000000000 +0100
@@ -932,6 +932,19 @@ file named @var{number}.
Execute @value{GDBN} commands from file @var{file}. @xref{Command
Files,, Command files}.
+@item -eval-command @var{command}
+@itemx -ex @var{command}
+@cindex @code{--eval-command}
+@cindex @code{-ex}
+Execute a single @value{GDBN} command.
+
+This option may be used multiple times to call multiple commands. It may
+also be interleaved with @samp{-command} as required.
+
+@smallexample
+@value{GDBP} -ex 'target sim' -ex 'load' -x setbreakpoints -ex 'run' a.out
+@end smallexample
+
@item -directory @var{directory}
@itemx -d @var{directory}
@cindex @code{--directory}