debugging gdb using gdb
Jan Kratochvil
jan.kratochvil@redhat.com
Sun Feb 20 08:07:00 GMT 2011
On Wed, 16 Feb 2011 04:41:59 +0100, paawan oza wrote:
> during reversible implementation, I am trying to debug arm-gdb using arm-gdb.
> so i connect through telnet terminal and open two different terminals.
> and run both the gdb on target and attach the one gdb with another one.
> the moment I attach another gdb and give continue command, the gdb being
> debugged, looses iis terminal, and I am not able to type anything, and gdb does
> not accept any keyboard input and it hangs.
One of the possibilities is a ptrace kernel bug. For example there was a bug
reproducing only during gdb debugging of gdb (but not via attach):
http://sources.redhat.com/cgi-bin/cvsweb.cgi/~checkout~/tests/ptrace-tests/tests/o_tracevfork-parent.c?cvsroot=systemtap
There are large parts of the ptrace implementation arch-dependent. You can
compare the testsuite results on x86 vs. arm, although the bug you hit there
is most probably not yet convered by it:
cvs -d :pserver:anoncvs:anoncvs@sourceware.org:/cvs/systemtap co ptrace-tests
You can strace (without -f!) the second gdb to see how the ptrace/wait
syscalls behave. Then you can try to minimize the behavior to a testcase for
an arm kernel fix.
(Sure the reason can be also completely different than ptrace.)
Regards,
Jan
More information about the Gdb
mailing list