List Info

Thread: debugging multi threaded application




debugging multi threaded application
user name
2008-05-07 20:16:15
Hi,
 
I am trying to debug a multithreaded application using
gdbserver and
gdb. I crossed compiled gdb with --enable-threads option.
When I start
the debugger on the host i don't get the print "Using
host libthread_db
library". and when I conenct the debugger to remote
target I get
 
[New Thread 127]
0x00000000 in ?? ()

I am also not able to get any info using info threads. I
have set
LD_LIBRARY_PATH. I have also tried giving the path of the
libthread_db
at the host gdb
 
set solib-search-path ../../root/lib
set solib-absolute-prefix ../../root/lib

Any pointers what I might be missing. 

Thanks
Mudeem

Re: debugging multi threaded application
user name
2008-05-07 21:21:38
On Wed, May 07, 2008 at 06:16:15PM -0700, Mudeem Siddiqui
wrote:
> set solib-search-path ../../root/lib
> set solib-absolute-prefix ../../root/lib

Those aren't the right settings.  Take a look at the current
version
of the manual on the GDB web site and see if that makes it
any clearer
what should set solib-absolute-prefix to?  Probably just
../../root in
this case.

-- 
Daniel Jacobowitz
CodeSourcery

Re: debugging multi threaded application
user name
2008-05-08 13:45:56
On Wed, 2008-05-07 at 18:16 -0700, Mudeem Siddiqui wrote:
> Hi,
>  
> I am trying to debug a multithreaded application using
gdbserver and
> gdb. I crossed compiled gdb with --enable-threads
option. When I start
> the debugger on the host i don't get the print
"Using host libthread_db
> library". and when I conenct the debugger to
remote target I get
>  
> [New Thread 127]
> 0x00000000 in ?? ()
> 
> I am also not able to get any info using info threads.
I have set
> LD_LIBRARY_PATH. I have also tried giving the path of
the libthread_db
> at the host gdb
>  
> set solib-search-path ../../root/lib
> set solib-absolute-prefix ../../root/lib
> 
> Any pointers what I might be missing. 

We need to know more about your host and target machines, 
operating systems, and how gdb and gdbserver were
configured.




RE: debugging multi threaded application
user name
2008-05-09 15:04:56
Here is how I configure gdb and gdbserver

Cross-Target binaries are compiled as

./configure --prefix=/home/mudeem/usr/gdb/cross
--target=mipsel-linux-uclibc --enable-threads
--enable-shared
--disable-werror
make
make install

Target-native binaries are compiled as

export CC=mipsel-linux-uclibc-gcc
export RANLIB=mipsel-linux-uclibc-ranlib
export
LDFLAGS="-L/home/mudeem/usr/cross/termcap/lib"
export
CPPFLAGS="-I/home/mudeem/QV140X/LINUX/KERNEL/linux-2.4.
25/include
-I/home/mudeem/usr/cross/termcap/include"
export
CFLAGS="-I/home/mudeem/QV140X/LINUX/KERNEL/linux-2.4.25
/include"
./configure --prefix=/home/mudeem/usr/gdb/native
--host=mipsel-linux-uclibc --target=mipsel-linux-uclibc
--enable-threads
--enable-shared
make
make install

The tools version are

gdb version 			6.8 
mipsel-linux-uclibc-gcc		3.2.2
Kernel Version target		2.4.25

Kernel version host		2.4.21	
gcc					3.2.3

Then I set solib-search-path in which I have libthread_db
but I don't
know if libthread_db is used or not. Another question
should
libthread_db be in the lib path while compiling gdb.

Thanks
Mudeem 

-----Original Message-----
From: Michael Snyder [mailto:msnyderspecifix.com] 
Sent: Thursday, May 08, 2008 11:46 AM
To: Mudeem Siddiqui
Cc: gdbsourceware.org
Subject: Re: debugging multi threaded application

On Wed, 2008-05-07 at 18:16 -0700, Mudeem Siddiqui wrote:
> Hi,
>  
> I am trying to debug a multithreaded application using
gdbserver and 
> gdb. I crossed compiled gdb with --enable-threads
option. When I start

> the debugger on the host i don't get the print
"Using host 
> libthread_db library". and when I conenct the
debugger to remote 
> target I get
>  
> [New Thread 127]
> 0x00000000 in ?? ()
> 
> I am also not able to get any info using info threads.
I have set 
> LD_LIBRARY_PATH. I have also tried giving the path of
the libthread_db

> at the host gdb
>  
> set solib-search-path ../../root/lib
> set solib-absolute-prefix ../../root/lib
> 
> Any pointers what I might be missing. 

We need to know more about your host and target machines,
operating
systems, and how gdb and gdbserver were configured.




RE: debugging multi threaded application
user name
2008-05-09 20:44:48
Hi gdb gurus

I again compiled gdb and gdbserver. I looked in config.log
and I see
that it can't find libthread_db.so.1 so it gives the
warning

configure:4185: result: no
configure:4188: WARNING: Could not find libthread_db.
configure:4190: WARNING: Disabling thread support in
gdbserver.

In my lib directory, I do have libthread_db but with
slightly different
name i.e libthread_db.so.0 and libthread_db-0.9.21.so.
Attached Is
config.log for the reference. What can I do to get this
thing working 

Thanks
Mudeem



-----Original Message-----
From: gdb-ownersourceware.org [mailto:gdb-ownersourceware.org] On
Behalf Of Mudeem Siddiqui
Sent: Friday, May 09, 2008 1:05 PM
To: Michael Snyder
Cc: gdbsourceware.org
Subject: RE: debugging multi threaded application

Here is how I configure gdb and gdbserver

Cross-Target binaries are compiled as

./configure --prefix=/home/mudeem/usr/gdb/cross
--target=mipsel-linux-uclibc --enable-threads
--enable-shared
--disable-werror make make install

Target-native binaries are compiled as

export CC=mipsel-linux-uclibc-gcc
export RANLIB=mipsel-linux-uclibc-ranlib export
LDFLAGS="-L/home/mudeem/usr/cross/termcap/lib"
export
CPPFLAGS="-I/home/mudeem/QV140X/LINUX/KERNEL/linux-2.4.
25/include
-I/home/mudeem/usr/cross/termcap/include"
export
CFLAGS="-I/home/mudeem/QV140X/LINUX/KERNEL/linux-2.4.25
/include"
./configure --prefix=/home/mudeem/usr/gdb/native
--host=mipsel-linux-uclibc --target=mipsel-linux-uclibc
--enable-threads
--enable-shared make make install

The tools version are

gdb version 			6.8 
mipsel-linux-uclibc-gcc		3.2.2
Kernel Version target		2.4.25

Kernel version host		2.4.21	
gcc					3.2.3

Then I set solib-search-path in which I have libthread_db
but I don't
know if libthread_db is used or not. Another question
should
libthread_db be in the lib path while compiling gdb.

Thanks
Mudeem 

-----Original Message-----
From: Michael Snyder [mailto:msnyderspecifix.com]
Sent: Thursday, May 08, 2008 11:46 AM
To: Mudeem Siddiqui
Cc: gdbsourceware.org
Subject: Re: debugging multi threaded application

On Wed, 2008-05-07 at 18:16 -0700, Mudeem Siddiqui wrote:
> Hi,
>  
> I am trying to debug a multithreaded application using
gdbserver and 
> gdb. I crossed compiled gdb with --enable-threads
option. When I start

> the debugger on the host i don't get the print
"Using host 
> libthread_db library". and when I conenct the
debugger to remote 
> target I get
>  
> [New Thread 127]
> 0x00000000 in ?? ()
> 
> I am also not able to get any info using info threads.
I have set 
> LD_LIBRARY_PATH. I have also tried giving the path of
the libthread_db

> at the host gdb
>  
> set solib-search-path ../../root/lib
> set solib-absolute-prefix ../../root/lib
> 
> Any pointers what I might be missing. 

We need to know more about your host and target machines,
operating
systems, and how gdb and gdbserver were configured.




  
Re: debugging multi threaded application
user name
2008-05-10 02:43:30
"Mudeem Siddiqui" <mudeemquartics.com> writes:

> In my lib directory, I do have libthread_db but with
slightly different
> name i.e libthread_db.so.0 and libthread_db-0.9.21.so.
Attached Is
> config.log for the reference. What can I do to get this
thing working 

How did you set up the cross tools?  You are missing the
link from
libthread_db.so to one of these files.  The linker looks
for
libthread_db.so and libthread_db.a, but no other file.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwabsuse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg,
Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5
214B 8276 4ED5
"And now for something completely different."

[1-6]

about | contact  Other archives ( Real Estate discussion Medical topics )