This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: debugging gdb using gdb


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]