This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: GDB as a loader 3/3: --eval-command option


Please make the example shorter, because this is too long and will
overflow the page margins.  (Alternatively, break the command into two
lines, and put a `\' at the end of the first one, as you'd do at the
shell's prompt.)


I've wrapped it. What is the proper width? It fitted into 80 columns ok so I thought it would be fine.


Andrew
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 14:39:29.000000000 +0100
+++ src/gdb/doc/gdb.texinfo	2005-10-28 14:43:37.000000000 +0100
@@ -932,6 +932,20 @@ 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}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]