This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: debugging gdb using gdb
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: paawan oza <paawan1982 at yahoo dot com>
- Cc: gdb at sourceware dot org
- Date: Sun, 20 Feb 2011 09:07:07 +0100
- Subject: Re: debugging gdb using gdb
- References: <810666.91200.qm@web112518.mail.gq1.yahoo.com>
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