* what is the "-ex" command option?
@ 2012-08-11 7:33 Smith John
2012-08-11 15:59 ` Mike Frysinger
0 siblings, 1 reply; 3+ messages in thread
From: Smith John @ 2012-08-11 7:33 UTC (permalink / raw)
To: gdb
hi:
when debugging using gdb , what is the use of "-ex" command option?
thanks!
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: what is the "-ex" command option?
2012-08-11 7:33 what is the "-ex" command option? Smith John
@ 2012-08-11 15:59 ` Mike Frysinger
2012-08-11 16:20 ` Eli Zaretskii
0 siblings, 1 reply; 3+ messages in thread
From: Mike Frysinger @ 2012-08-11 15:59 UTC (permalink / raw)
To: gdb; +Cc: Smith John
[-- Attachment #1: Type: Text/Plain, Size: 698 bytes --]
On Saturday 11 August 2012 03:33:26 Smith John wrote:
> when debugging using gdb , what is the use of "-ex" command
> option?
$ gdb --help | grep -e--eval-command -A 3
--eval-command=COMMAND, -ex
Execute a single GDB command.
May be used multiple times and in conjunction
with --command.
$ echo 'main(){}' | gcc -x c - -g -o a.out
$ gdb -ex 'break main' -ex run ./a.out
Reading symbols from /home/vapier/a.out...done.
Breakpoint 1 at 0x4004c8: file <stdin>, line 1.
Starting program: /home/vapier/a.out
Breakpoint 1, main () at <stdin>:1
1 <stdin>: No such file or directory.
(gdb)
-mike
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: what is the "-ex" command option?
2012-08-11 15:59 ` Mike Frysinger
@ 2012-08-11 16:20 ` Eli Zaretskii
0 siblings, 0 replies; 3+ messages in thread
From: Eli Zaretskii @ 2012-08-11 16:20 UTC (permalink / raw)
To: Mike Frysinger; +Cc: gdb, horserivers
> From: Mike Frysinger <vapier@gentoo.org>
> Date: Sat, 11 Aug 2012 11:59:15 -0400
> Cc: Smith John <horserivers@gmail.com>
>
> $ gdb --help | grep -e--eval-command -A 3
> --eval-command=COMMAND, -ex
> Execute a single GDB command.
> May be used multiple times and in conjunction
> with --command.
Btw, the place we show "-ex" on the screen is unfortunate, as it is
very hard to find it at first glance. See how it is obscured by text
above and below it:
--cd=DIR Change current directory to DIR.
--command=FILE, -x Execute GDB commands from FILE.
--eval-command=COMMAND, -ex
Execute a single GDB command.
May be used multiple times and in conjunction
It would be much better if we reformat the output like this:
--cd=DIR Change current directory to DIR.
--command=FILE, -x Execute GDB commands from FILE.
--eval-command=COMMAND,
-ex Execute a single GDB command.
May be used multiple times and in conjunction
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-08-11 16:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-11 7:33 what is the "-ex" command option? Smith John
2012-08-11 15:59 ` Mike Frysinger
2012-08-11 16:20 ` Eli Zaretskii
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).