Is there a way to set break point via cmd line on using GDB.
Currently on running GDB, I need to set
(gdb) b fun1
(gdb) b fun2
(gdb) b fun3
and If I close and open the GDB again, I need to set all the break points 🙁 .
Is there a way to set break point for GDB in cmd line itself, like
$> gdb -break fun1 -break fun2 -break fun3 ./myprog
GDB Provides -ex option to set GDB commands such as ‘break’ ‘info’ ‘set print’ ‘display x’ on invoking GDB from command line, as shown below
The option of -ex option is not specified in man page or in GDB help 🙁