From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7607 invoked by alias); 26 May 2009 22:08:01 -0000 Received: (qmail 7596 invoked by uid 22791); 26 May 2009 22:07:59 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-pz0-f175.google.com (HELO mail-pz0-f175.google.com) (209.85.222.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 26 May 2009 22:07:51 +0000 Received: by pzk5 with SMTP id 5so4265951pzk.12 for ; Tue, 26 May 2009 15:07:49 -0700 (PDT) MIME-Version: 1.0 Received: by 10.110.37.3 with SMTP id k3mr293911tik.57.1243375669009; Tue, 26 May 2009 15:07:49 -0700 (PDT) In-Reply-To: <1531E53627F1F749B4FE809BF2A4EB67FABA56@WETMEX10.loepfe.com> References: <1531E53627F1F749B4FE809BF2A4EB67FABA56@WETMEX10.loepfe.com> Date: Tue, 26 May 2009 22:08:00 -0000 Message-ID: Subject: Re: Q: GDB - Threads From: Hui Zhu To: "Vellemans, Noel" Cc: gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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-05/txt/msg00170.txt.bz2 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 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 : =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 (C) 2008 Free Software Foundation, Inc. > License GPLv3+: GNU GPL version 3 or later > > This is free software: you are free to change and redistribute it. > There is NO WARRANTY, to the extent permitted by law. =A0Type "show > copying" > and "show warranty" for details. > This GDB was configured as "--host=3Di386-pc-linux-gnu > --target=3Darm-linux-uclibc". > > > > > > > > > Kind Regards, > Noel. > > >