From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15326 invoked by alias); 20 Feb 2011 08:07:20 -0000 Received: (qmail 15317 invoked by uid 22791); 20 Feb 2011 08:07:18 -0000 X-SWARE-Spam-Status: No, hits=-6.0 required=5.0 tests=AWL,BAYES_00,HK_OBFDOM,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 20 Feb 2011 08:07:11 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p1K879ib012778 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 20 Feb 2011 03:07:09 -0500 Received: from host1.dyn.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p1K8784W003697 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 20 Feb 2011 03:07:09 -0500 Received: from host1.dyn.jankratochvil.net (localhost [127.0.0.1]) by host1.dyn.jankratochvil.net (8.14.4/8.14.4) with ESMTP id p1K8776V007077; Sun, 20 Feb 2011 09:07:07 +0100 Received: (from jkratoch@localhost) by host1.dyn.jankratochvil.net (8.14.4/8.14.4/Submit) id p1K877mk007076; Sun, 20 Feb 2011 09:07:07 +0100 Date: Sun, 20 Feb 2011 08:07:00 -0000 From: Jan Kratochvil To: paawan oza Cc: gdb@sourceware.org Subject: Re: debugging gdb using gdb Message-ID: <20110220080707.GA6601@host1.dyn.jankratochvil.net> References: <810666.91200.qm@web112518.mail.gq1.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <810666.91200.qm@web112518.mail.gq1.yahoo.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2011-02/txt/msg00111.txt.bz2 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