From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6716 invoked by alias); 2 Jun 2009 15:27:33 -0000 Received: (qmail 6706 invoked by uid 22791); 2 Jun 2009 15:27:32 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mail189.messagelabs.com (HELO mail189.messagelabs.com) (85.158.139.179) by sourceware.org (qpsmtpd/0.43rc1) with SMTP; Tue, 02 Jun 2009 15:27:24 +0000 X-VirusChecked: Checked X-Env-Sender: Noel.Vellemans@visionBMS.com X-Msg-Ref: server-10.tower-189.messagelabs.com!1243956440!21911467!1 X-StarScan-Version: 6.0.0; banners=-,-,- Received: (qmail 3578 invoked from network); 2 Jun 2009 15:27:20 -0000 Received: from gateway.loepfe.com (HELO gateway.loepfe.com) (195.134.156.204) by server-10.tower-189.messagelabs.com with SMTP; 2 Jun 2009 15:27:20 -0000 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: Q: GDB - Threads Date: Tue, 02 Jun 2009 15:27:00 -0000 Message-ID: <1531E53627F1F749B4FE809BF2A4EB67FD9F52@WETMEX10.loepfe.com> In-Reply-To: References: <1531E53627F1F749B4FE809BF2A4EB67FABA56@WETMEX10.loepfe.com> From: "Vellemans, Noel" To: 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: 2009-06/txt/msg00006.txt.bz2 Hi, still strugling to DEBUG threads... I ' got a hint from someone that told me.=20 A) I should check if my libpthread.so.0 if it is not stripped. And it isn't ..=20=20 arm-linux-uclibc-nm libpthread-0.9.30.1.so=20 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)..=20 Even started from scratch....=20 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 -> libp= thread-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 -> li= bthread_db-0.9.30.1.so Still not able to debug a MT-application :-(=20 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]=20 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 SI= GTRAP 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 detai= l. 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 li= bpthread.so.0. On Wed, May 27, 2009 at 00:02, Vellemans, Noel wrote: > > Hi, > > Somebody who can point me to a document (URL) that contains some info=20 > about GDB-(server)debugging with threads ? > > I'm having problems debugging multithread applications (compiled for=20 > ARM). > > > Ref to : =A0http://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=20 > (C) 2008 Free Software Foundation, Inc. > License GPLv3+: GNU GPL version 3 or later=20 > > This is free software: you are free to change and redistribute it. > There is NO WARRANTY, to the extent permitted by law. =A0Type "show=20 > copying" > and "show warranty" for details. > This GDB was configured as "--host=3Di386-pc-linux-gnu=20 > --target=3Darm-linux-uclibc". > > > > > > > > > Kind Regards, > Noel. > > >