Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "Vellemans, Noel" <Noel.Vellemans@visionBMS.com>
To: <gdb@sourceware.org>
Subject: RE: Q: GDB - Threads
Date: Tue, 02 Jun 2009 15:27:00 -0000	[thread overview]
Message-ID: <1531E53627F1F749B4FE809BF2A4EB67FD9F52@WETMEX10.loepfe.com> (raw)
In-Reply-To: <daef60380905261507i54e8f3b6q38c7c88a1d063fa0@mail.gmail.com>


Hi, still strugling to DEBUG threads...


I ' got a hint from someone that told me. 

A) I should check if my libpthread.so.0 if it is not stripped.

And it isn't ..  

arm-linux-uclibc-nm libpthread-0.9.30.1.so 
00012cf4 a _DYNAMIC
00012dbc a _GLOBAL_OFFSET_TABLE_
         w _Jv_RegisterClasses
00012ce4 d __CTOR_END__
00012cdc d __CTOR_LIST__
00012cec d __DTOR_END__
00012ce8 d __DTOR_LIST__
0000a25c r __EH_FRAME_BEGIN__
...... < removed some stuff here >>


B) that there should be a mismatch between libthread.so.0 and libthread_db.so.1
Both libs have been build on the same system.. (buildroot).. 
Even started from scratch.... 
 88 -rw-r--r--  1 noel noel  82178 2009-06-02 16:23 libpthread-0.9.30.1.so
  0 lrwxrwxrwx  1 noel noel     22 2009-06-02 16:23 libpthread.so.0 -> libpthread-0.9.30.1.so

 16 -rw-r--r--  1 noel noel  13171 2009-06-02 16:23 libthread_db-0.9.30.1.so
  0 lrwxrwxrwx  1 noel noel     24 2009-06-02 16:23 libthread_db.so.1 -> libthread_db-0.9.30.1.so




Still not able to debug a MT-application :-( 

Anyone that can help me 'little' further ??


Ref to :  http://sourceware.org/ml/gdb/2009-05/msg00137.html



Kind regards Noel.



-----Original Message-----
From: Hui Zhu [mailto:teawater@gmail.com] 
Sent: 27May09 00:08
To: Vellemans, Noel
Cc: gdb@sourceware.org
Subject: Re: Q: GDB - Threads

http://sourceware.org/gdb/current/onlinedocs/gdb_5.html#SEC28
http://sourceware.org/gdb/wiki/FAQ

GDB does not see any threads besides the one in which crash occurred; or SIGTRAP kills my program when I set a breakpoint.

    * This frequently happen on Linux, especially on embedded targets.
There are two common causes:
          o

            you are using glibc, and you have stripped libpthread.so.0
          o

            mismatch between libpthread.so.0 and libthread_db.so.1

      GDB itself does not know how to decode "thread control blocks"
maintained by glibc and considered to be glibc private implementation detail. It uses libhread_db.so.1 (part of glibc) to help it do so.
Therefore, libthread_db.so.1 and libpthread.so.0 must match in version and compilation flags.

      In addition, libthread_db.so.1 requires certain non-global symbols to be present in libpthread.so.0.

      Solution: use strip --strip-debug libpthread.so.0 instead of strip libpthread.so.0.




On Wed, May 27, 2009 at 00:02, Vellemans, Noel <Noel.Vellemans@visionbms.com> wrote:
>
> Hi,
>
> Somebody who can point me to a document (URL) that contains some info 
> about GDB-(server)debugging with threads ?
>
> I'm having problems debugging multithread applications (compiled for 
> ARM).
>
>
> Ref to :  http://sourceware.org/ml/gdb/2009-05/msg00137.html
>
>
>
> GDB-6.8 (for ARM).
>
> /toolchain_build_arm/gdbhost-6.8/gdb$ ./gdb --v GNU gdb 6.8 Copyright 
> (C) 2008 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later 
> <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.  Type "show 
> copying"
> and "show warranty" for details.
> This GDB was configured as "--host=i386-pc-linux-gnu 
> --target=arm-linux-uclibc".
>
>
>
>
>
>
>
>
> Kind Regards,
> Noel.
>
>
>


  reply	other threads:[~2009-06-02 15:27 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-26 16:02 Vellemans, Noel
2009-05-26 22:08 ` Hui Zhu
2009-06-02 15:27   ` Vellemans, Noel [this message]
2009-06-02 16:41     ` Paul Pluzhnikov
2009-06-02 18:17       ` Daniel Jacobowitz
2009-06-02 18:34         ` Paul Pluzhnikov
2009-06-02 19:34           ` Daniel Jacobowitz
2009-06-03 15:21             ` Vellemans, Noel
2009-06-02 19:42           ` Paul Pluzhnikov
2009-06-03  3:17             ` Hui Zhu
2009-06-03  9:26         ` Vellemans, Noel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1531E53627F1F749B4FE809BF2A4EB67FD9F52@WETMEX10.loepfe.com \
    --to=noel.vellemans@visionbms.com \
    --cc=gdb@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox