RFC: GDB as a loader 3/3: --eval-command option
Andrew STUBBS
andrew.stubbs@st.com
Tue Oct 18 11:33:00 GMT 2005
Hi all,
The attached patch implements a new option --eval-command (-ex for
short) which works similarly to the --command option except that it
passes the command itself, rather than a file name containing commands.
In most cases, this eliminates the need for temporary files or messing
around with stdin when running programs via the debugger.
For example:
gdb hello.exe --batch -ex 'target sim' -ex load -ex run
This option may be used in conjunction with the existing --command (-x)
command and the order of the options is honoured.
It is still necessary to use a script file if define/if/while, or any
other nested construct, is required. Suggestions on how to deal with
this would be welcome.
Note that the patch assumes that the batch-silent and
return-child-result patches have already been applied (although the
implementation in no way depends on those features).
Thanks
Andrew Stubbs
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: eval-command.patch
URL: <http://sourceware.org/pipermail/gdb/attachments/20051018/ac72738d/attachment.ksh>
More information about the Gdb
mailing list