This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: How to debug gdb using gdb ?
On Tue, 07 Aug 2012 16:18:01 +0200, Smith John wrote:
> but how can I send command to the debugged gdb procedure
> which is children process ,
I find most easy to make child GDB non-interactive. So that you do not have
to re-enter the exact commands to reproduce the problem each time. Therefore
use -ex (or -x) for the child GDB:
gdb -ex 'b breakpoint.c:9152' -ex r --args ./gdb ~/t/try5 -ex 'b display' -ex r -ex up -ex b -ex 'info b' -ex 'p/x $pc' -ex 'info line *$pc' -ex 'set confirm no' -ex q -q
Regards,
Jan