From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27282 invoked by alias); 15 Feb 2008 23:26:27 -0000 Received: (qmail 27268 invoked by uid 22791); 15 Feb 2008 23:26:27 -0000 X-Spam-Check-By: sourceware.org Received: from mail.pioneer-pra.com (HELO mail2.dmz.sj.pioneer-pra.com) (65.205.244.70) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 15 Feb 2008 23:26:00 +0000 Received: from localhost (localhost [127.0.0.1]) by mail2.dmz.sj.pioneer-pra.com (Postfix) with ESMTP id C27F923434E; Fri, 15 Feb 2008 15:25:58 -0800 (PST) Received: from mail2.dmz.sj.pioneer-pra.com ([127.0.0.1]) by localhost (neo2 [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 19593-08; Fri, 15 Feb 2008 15:25:58 -0800 (PST) Received: from host-174.sj.pioneer-pra.com (gw.dmz.sj.pioneer-pra.com [192.168.111.1]) by mail2.dmz.sj.pioneer-pra.com (Postfix) with ESMTP id 0EF33234313 for ; Fri, 15 Feb 2008 15:25:58 -0800 (PST) Subject: gdbserver on broadcom MIPS problem --> "error initializing thread_db library" From: Mrukant Popat Reply-To: mpopat@pioneer-pra.com To: gdb@sourceware.org Content-Type: text/plain Date: Fri, 15 Feb 2008 23:26:00 -0000 Message-Id: <1203117964.6532.18.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.6.1 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: 2008-02/txt/msg00110.txt.bz2 hi folks, I have setup the debugging enviroment on Linux host using mipel-linux-gdb on i686 host and gdbserver on broadcom MIPS target. In this scenario, I am not using JTAG at all. My query is regarding debugging of multi-threaded application. Here are the steps I used to setup the environment. Also the kernel is booted thru tftp and filesystem is over NFS. 1) on target: gdbserver hostIP:5000 application_name (assuming I have installed all drivers and LD_LIBRARY_PATH is set correctly) 2) on host: ./mipsel-linux-gdb 3) on host: (gdb) file application_name 4) on host: (gdb) set solib-search-path : 5) on host: (gdb) target remote targetIP:5000 (the target shows that host is now connected for debugging) 6) on host: (gdb) continue When I enter the command "continue" in mipsel-linux-gdb on host, it gives me many lines of warnings in gdbserver on targer --> "gdb: error initializing thread_db library" . Also when I again enter continue, then after some time the mipsel-linux-gdb on host give me this error --> "Program received signal SIG32, Real-time event 32. 0x2b03b224 in __rt_sigsuspend () from /opt/nfsroot_uclibc/images/7401c0/initramfs/lib/libc.so.0" This happens with all the multi-threaded applications. I tried to search in google and in one of the mailing list of busybox (gzip attached bcos that is what I got from google) this is what was written ###################--mail list start #################### /* mods for uClibc: __libc_sigaction is not in any standard headers */ >From andersen at codepoet.org Thu Oct 7 07:41:12 2004 From: andersen at codepoet.org (Erik Andersen) Date: Thu Oct 7 07:41:16 2004 Subject: [uClibc] gdb: error initializing thread_db library In-Reply-To: <5.1.0.14.2.20041007123250.4123a5a0@mail.beamex.com> References: <5.1.0.14.2.20040923095932.411f8da0@mail.beamex.com> <5.1.0.14.2.20041007123250.4123a5a0@mail.beamex.com> Message-ID: <20041007134112.GA21412@codepoet.org> On Thu Oct 07, 2004 at 12:46:24PM +0300, Caj Nordstr?m wrote: > > For some time ago I asked about gdbserver and multi-thread > support. I did not get any answers so I want to ask again. > This time also the additional questions: > > Has anyone used gdbserver successfully with uClibc libthread_db? Yes. > What processor did you use? I used mips, but due to a problem with ldso on mips, you have to staticly link applications to properly debug them. Especially so for apps using pthreads. -Erik ######################--mail list end ######################## The gdb version in the source for me is gdb-6.3. I downloaded latest gdb-6.7.1 and cross compiled for broadcom MIPS and used the gdbserver which gave me the same warning on target with little more info --> "gdb: error initializing thread_db library: unknown thread_db error '22'" . Also the same error in mipsel-linux-gdb (note: I did not change mipsel-linux-gdb) on host repeats --> "Program received signal SIG32, Real-time event 32. 0x2b03b224 in __rt_sigsuspend () from /opt/nfsroot_uclibc/images/7401c0/initramfs/lib/libc.so.0" I wanted to know how others, if there are any, are debugging the applications and how did they circumvent this issue. If there is any patch to GDB or uclibc runtime or there is something different altogether. Please let me know if you need more information on this issue to solve it. regards, Mrukant Popat Software Consultant, ATD group, Pioneer Research Center USA, Inc.