From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22936 invoked by alias); 18 Nov 2005 00:35:56 -0000 Received: (qmail 22924 invoked by uid 22791); 18 Nov 2005 00:35:53 -0000 Received: from trump.cadenux-support.com (HELO cadenux.com) (66.135.34.142) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Fri, 18 Nov 2005 00:35:53 +0000 Received: from Sidney (unknown [200.91.139.154]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by cadenux.com (Postfix) with ESMTP id 66D9D3A0475 for ; Fri, 18 Nov 2005 03:49:08 +0000 (UTC) Subject: gdb debugging threads help From: Teresa Rivas Reply-To: teresa.rivas@cadenux.com To: gdb@sources.redhat.com Content-Type: text/plain Date: Fri, 18 Nov 2005 00:35:00 -0000 Message-Id: <1132274170.32154.20.camel@localhost.localdomain> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2005-11/txt/msg00364.txt.bz2 Hi, I need to debug multi-threaded applications that runs on an arm platform in my x86 platform but I can't make that gdb compile and build the thread-db sources. This is the way I configured gdb: ./configure --host=i386-linux --program-prefix=arm-linux- --target=arm-linux and this is the way I configure gdbserver: ./configure --host=arm-linux --program-prefix=arm-linux- --target=arm-linux this are the libraries in the target and which paths I set in gdb using set solib-absolute-prefix and set solib-search-path commands: -rwxr-xr-x 1 trivas trivas 91306 2005-11-17 08:12 libpthread-0.9.26.so lrwxrwxrwx 1 trivas trivas 20 2005-11-17 08:12 libpthread.so -> libpthread-0.9.26.so lrwxrwxrwx 1 trivas trivas 20 2005-11-17 08:12 libpthread.so.0 -> libpthread-0.9.26.so -rwxr-xr-x 1 trivas trivas 19300 2005-11-17 16:36 libthread_db-0.9.26.so lrwxrwxrwx 1 trivas trivas 22 2005-11-17 08:12 libthread_db.so -> libthread_db-0.9.26.so lrwxrwxrwx 1 trivas trivas 22 2005-11-17 08:12 libthread_db.so.0 -> libthread_db-0.9.26.so lrwxrwxrwx 1 trivas trivas 22 2005-11-17 17:03 libthread_db.so.1 -> libthread_db-0.9.26.so the problem is that I can't see the treads created when I am debugging the application, only the main thread: on the target: # gdbserver :5234 simple Process simple created; pid = 91 Listening on port 5234 Remote debugging from host 192.168.200.29 thread 1 created thread 2 created Glory, employees contents was always consistent Child exited with retcode = 0 Child exited with status 0 GDBserver exiting on the host: GNU gdb 6.3 Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "--host=i686-linux --target=arm-linux". (gdb) set solib-absolute-prefix /target/arm-linux/lib (gdb) set solib-search-path /target/arm-linux/lib (gdb) dir /target/arm-linux/lib Source directories searched: /target/arm-linux/lib:$cdir:$cwd (gdb) set endian little The target is assumed to be little endian (gdb) target remote 192.168.200.199:5234 Remote debugging using 192.168.200.199:5234 0x40000c60 in ?? () (gdb) handle SIG32 nostop noprint pass Signal Stop Print Pass to program Description SIG32 No No Yes Real-time event 32 (gdb) add-symbol-file simple add symbol table from file "simple" at (y or n) y Reading symbols from /home/trivas/dm320-appro/fs/examples/threads/simple...done. (gdb) b 87 Breakpoint 1 at 0x8834: file simple.c, line 87. (gdb) b 122 Breakpoint 2 at 0x8a68: file simple.c, line 122. (gdb) c Continuing. Breakpoint 1, main (argc=1, argv=0xbefffed4) at simple.c:90 90 for (i=0; i<60000; i++) { (gdb) info threads 1 Thread 47 main (argc=1, argv=0xbefffed4) at simple.c:90 (gdb) c Continuing. Breakpoint 2, main (argc=1, argv=0xbefffed4) at simple.c:123 123 printf("Glory, employees contents was always consistent\n"); (gdb) info threads 1 Thread 47 main (argc=1, argv=0xbefffed4) at simple.c:123 (gdb) c Continuing. Program exited normally. (gdb) and if I try a info shared it says "No shared libraries loaded at this time" I see there is a thread-db.o target on the gdb/Makefile file but I can't configure gdb so it execute this thread-db.o target which I believe add the gdb debbug thread support. Have had somebody a similar problem or an idea that can help me?