How to debug gdb using gdb ?
Jan Kratochvil
jan.kratochvil@redhat.com
Tue Aug 7 14:22:00 GMT 2012
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
More information about the Gdb
mailing list