From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8816 invoked by alias); 29 May 2007 16:22:48 -0000 Received: (qmail 8806 invoked by uid 22791); 29 May 2007 16:22:48 -0000 X-Spam-Check-By: sourceware.org Received: from smtp1.dnsmadeeasy.com (HELO smtp1.dnsmadeeasy.com) (205.234.170.134) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 29 May 2007 16:22:45 +0000 Received: from smtp1.dnsmadeeasy.com (localhost [127.0.0.1]) by smtp1.dnsmadeeasy.com (Postfix) with ESMTP id B04892AC4CD; Tue, 29 May 2007 16:22:43 +0000 (GMT) X-Authenticated-Name: js.dnsmadeeasy X-Transit-System: In case of SPAM please contact abuse@dnsmadeeasy.com Received: from avtrex.com (unknown [67.116.42.147]) by smtp1.dnsmadeeasy.com (Postfix) with ESMTP; Tue, 29 May 2007 16:22:43 +0000 (GMT) Received: from [192.168.7.26] ([192.168.7.26]) by avtrex.com with Microsoft SMTPSVC(6.0.3790.1830); Tue, 29 May 2007 09:22:42 -0700 Message-ID: <465C5351.3030109@avtrex.com> Date: Tue, 29 May 2007 16:22:00 -0000 From: David Daney User-Agent: Thunderbird 1.5.0.10 (X11/20070302) MIME-Version: 1.0 To: Michael Zhang Cc: gdb@sourceware.org Subject: Re: remotely debugging muti-threaded applicaton did not work with gdb 6.3.50.20050725-cvs References: <3d234af30705290913u3d57fa8fp4ab53400027658a0@mail.gmail.com> In-Reply-To: <3d234af30705290913u3d57fa8fp4ab53400027658a0@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: 2007-05/txt/msg00174.txt.bz2 Michael Zhang wrote: > Hi there, > > I have been battling with this problem for a week now and searched > all the available information ( GDB manual, gdb mailing list, etc.) > but unfortunately could not find an answer. Here is my setup. > > - Host : x86 running FC1 with linux 2.4.22-1.2115.nptl > - Target : mips le running linux 2.4.17 > - gdb 6.3.50.20050725-cvs and its included gdbserver (all cross-built > for mips processor) > - libc library 2.2.3 ( most of the shared library bear this version ) > > Debugging problem: > > The gdb on the host can talk to the gdbserver on the target and I did > not forget to set "solib-absolute-prefix". If I set breakpoints before > the multiple threads are spawned, I could step through the code when > the breakpoint was hit. However, once the application finished > creating threads and if I stop the program to step through, it won't > step and alway stuck in libc.so.6. The worst is all the threads are > getting killed. And "info threads" never returns anything just > reporting that the gdbserver could not get thread list. > > Any ideas even though it might have bee asked before. I am basically > at my wit's end. > I had similar problems with a similar configuration. I would recommend updating to the current GDB release (version 6.6). I have not verified that gdbserver works for multi-threaded programs with the newer version, but it has a much better chance. As long as you are upgrading things, I would recommend at least glibc 2.3.3. The thread synchronization parts of libpthread are broken in 2.2.x for mips. If you have enough memory you could also try running a native gdb on the target. I have had very good results doing that. David Daeny