From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 831 invoked by alias); 15 May 2007 12:49:13 -0000 Received: (qmail 755 invoked by uid 22791); 15 May 2007 12:49:11 -0000 X-Spam-Check-By: sourceware.org Received: from correo.ikusi.com (HELO correo.ikusi.com) (194.30.89.100) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 15 May 2007 12:49:03 +0000 Received: from srviku004.ikusi.net ([192.168.202.14]) by correo.ikusi.com with Microsoft SMTPSVC(6.0.3790.1830); Tue, 15 May 2007 14:48:59 +0200 Received: from 192.168.234.102 ([192.168.234.102]) by srviku004.ikusi.net ([192.168.202.14]) via Exchange Front-End Server webmail.ikusi.com ([192.168.202.18]) with Microsoft Exchange Server HTTP-DAV ; Tue, 15 May 2007 12:48:59 +0000 Received: from DAFPC5206 by webmail.ikusi.com; 15 May 2007 14:49:05 +0200 Subject: Debugging pthread in ARM. From: gomrioje Reply-To: gomez.j@ikusi.es To: gdb@sourceware.org Content-Type: text/plain Content-Transfer-Encoding: 7bit Date: Tue, 15 May 2007 12:49:00 -0000 Message-Id: <1179233344.1389.18.camel@DAFPC5206.ikusi.net> Mime-Version: 1.0 X-Mailer: Evolution 2.6.3 X-TM-AS-Product-Ver: SMEX-7.0.0.1433-3.6.1039-15176.001 X-TM-AS-Result: No--19.090900-4.000000-4 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: 2007-05/txt/msg00050.txt.bz2 I am not able to see the point of Daniel (mea culpa). I have readen documentation as recommended by Daniel and William. Maybe trying again... The application uses: pthread_create. For that I am using as library (-lpthread): libpthread.so.0->libpthread-0.10.so For debugging purposes, I am using gdbserver in the target (AT91RM9200). gdbserver must use library: libthread_db.so.1->libthread_db-1.0.so Now I describe the problem: 1. When I set a breakpoint inside a thread code, I get a SIGTRAP. 2. After creating several threads (POSIX: pthread_create), command: info threads, result in: 1 main............... 3. Sometimes after running a while, I get a message in the gdbserver console: Gdb: error initalizing thread_db library: version mismatch between libthread_db and libpthread Both of the libraries come from the same Debian distribution, for ARM architecture. Daniel mentions problem pointing to libraries. For such situation, the config is: - For the gdbserver: export LD_LIBRARY_PATH=/lib:/usr/lib/:/app/arm/debug/:$LD_LIBRARY_PATH - For the gdb (host): set solib-absolute-prefix /dev/null/ set solib-search-path /app/arm/debug/:/app/arm/bitbaketmp/staging/arm-linux/lib/ I could miss something. Some ideas ? Regards, > Thanks for the link. > But I guess my problem is not described there. > I have another message: > Gdb: error initalizing thread_db library: version mismatch between libthread_db and libpthread > > I have read in the mailing list that both should have the same glibc. > (what do you mean there?). > > In another hand, I am already pointing solib-absolute-prefix to the directory libraries. If you're doing that, and getting the above error, then you are not pointing to the correct libraries. -- Jesus Gomez Rio R&D Technician Design & Manufacturing Division gomez.j@ikusi.com www.ikusi.es ---