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 , line 1. Starting program: /home/vapier/a.out Breakpoint 1, main () at :1 1 : No such file or directory. (gdb) -mike