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]

gdbserver on broadcom MIPS problem --> "error initializing thread_db library"


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
<path-on-host-to-sharedlibs>:<other-path-on-host-to-other shardlibs>
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.


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