From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27107 invoked by alias); 17 Dec 2009 18:21:43 -0000 Received: (qmail 26910 invoked by uid 22791); 17 Dec 2009 18:21:42 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.33.17) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 17 Dec 2009 18:18:48 +0000 Received: from spaceape12.eur.corp.google.com (spaceape12.eur.corp.google.com [172.28.16.146]) by smtp-out.google.com with ESMTP id nBHIIklb028980 for ; Thu, 17 Dec 2009 18:18:46 GMT Received: from qyk33 (qyk33.prod.google.com [10.241.83.161]) by spaceape12.eur.corp.google.com with ESMTP id nBHIIgOA014033 for ; Thu, 17 Dec 2009 10:18:43 -0800 Received: by qyk33 with SMTP id 33so1068584qyk.26 for ; Thu, 17 Dec 2009 10:18:42 -0800 (PST) MIME-Version: 1.0 Received: by 10.224.42.131 with SMTP id s3mr1831132qae.111.1261073922657; Thu, 17 Dec 2009 10:18:42 -0800 (PST) In-Reply-To: <597A11B8CF75534EBE76656E186BF106E013E6@stella.stratos.local> References: <597A11B8CF75534EBE76656E186BF106E0135E@stella.stratos.local> <8ac60eac0912162044k34bc2765ja16c74274141275a@mail.gmail.com> <597A11B8CF75534EBE76656E186BF106E013E6@stella.stratos.local> Date: Thu, 17 Dec 2009 18:21:00 -0000 Message-ID: <8ac60eac0912171018h67548c94x1ce63904b9f6d136@mail.gmail.com> Subject: Re: Cross-platform, multithreaded debugging (x86 to ARM) with gdb and gdbserver not recognizing threads From: Paul Pluzhnikov To: Jason Machacek Cc: gdb@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true 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-12/txt/msg00102.txt.bz2 On Thu, Dec 17, 2009 at 10:01 AM, Jason Machacek wr= ote: >> - Is libpthread.so.0 on target stripped? > > It doesn't appear to be. =A0I made a copy of libthread_db-1.0.so and ran > 'strip' on it, and the file size dropped. =A0Is this the correct approach? It's not libthread_db, it's the libpthread that matters. You want to copy /lib/libpthread.so.0 (which should be a symlink to /lib/libpthread-2.3.2.so) from target to host, and then: arm-linux-nm libpthread.so.0 | egrep 'version|threads_events' You should see one of: nptl_version, __linuxthreads_version or __pthread_threads_events. If you see 'no symbols' instead, then your libpthread is stripped, and that explains your problems. > and libc.so.6 is statically linked into my application. It is impossible to statically link libc.so.6 into an application. Perhaps you mean that your app is linked with libc.a ? In general GDB may have harder time debugging statically-linked threaded executables, and you should always prefer to link against system libraries dynamically. Cheers, --=20 Paul Pluzhnikov