From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18022 invoked by alias); 17 Jul 2003 08:11:21 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 18013 invoked from network); 17 Jul 2003 08:11:17 -0000 Received: from unknown (HELO moutvdom.kundenserver.de) (212.227.126.251) by sources.redhat.com with SMTP; 17 Jul 2003 08:11:17 -0000 Received: from [212.227.126.221] (helo=mrvdomng.kundenserver.de) by moutvdom.kundenserver.de with esmtp (Exim 3.35 #1) id 19d3rA-0007yN-00 for gdb@sources.redhat.com; Thu, 17 Jul 2003 10:11:16 +0200 Received: from [213.20.224.16] (helo=[192.168.0.24]) by mrvdomng.kundenserver.de with esmtp (Exim 3.35 #1) id 19d3rA-0006ui-00 for gdb@sources.redhat.com; Thu, 17 Jul 2003 10:11:16 +0200 Subject: gdbserver on arm and multithreading again From: unknown To: gdb@sources.redhat.com Content-Type: text/plain Organization: Message-Id: <1058429390.22837.38.camel@ruhe> Mime-Version: 1.0 Date: Thu, 17 Jul 2003 08:11:00 -0000 Content-Transfer-Encoding: 7bit X-SW-Source: 2003-07/txt/msg00196.txt.bz2 Hi I read many postings about this, but I cannot get it working. :( My Testprogram: -- #include #include #include void * Thread1( void * p ) { char * ptr = 0; *ptr = 0; // Make Segfault in Thread return NULL; } int main( int argc, char ** argv ) { pthread_t pid; pthread_create( &pid, NULL, Thread1, NULL ); pthread_join( pid, NULL ); return 0; } ----------------------------------------------------------- I built gdbserver like this: frank@ruhe:/arbeit/gdbserver$ export CC=/usr/local/arm-linux/bin/arm-linux-gcc frank@ruhe:/arbeit/gdbserver$ ../gdb+dejagnu-20030716/gdb/gdbserver/configure --prefix=/usr/local/arm-linux arm-unknown-linux-gnu creating cache ./config.cache checking for gcc... /usr/local/arm-linux/bin/arm-linux-gcc checking whether the C compiler (/usr/local/arm-linux/bin/arm-linux-gcc ) works... yes checking whether the C compiler (/usr/local/arm-linux/bin/arm-linux-gcc ) is a cross-compiler... yes checking whether we are using GNU C... yes checking whether /usr/local/arm-linux/bin/arm-linux-gcc accepts -g... yes checking host system type... arm-unknown-linux-gnu checking target system type... arm-unknown-linux-gnu checking build system type... arm-unknown-linux-gnu checking for a BSD compatible install... /usr/bin/install -c checking how to run the C preprocessor... /usr/local/arm-linux/bin/arm-linux-gcc -E checking for ANSI C header files... yes checking for sgtty.h... yes checking for termio.h... yes checking for termios.h... yes checking for sys/reg.h... no checking for string.h... yes checking for proc_service.h... no checking for sys/procfs.h... yes checking for thread_db.h... yes checking for linux/elf.h... yes checking for stdlib.h... yes checking for unistd.h... yes checking whether strerror must be declared... no checking for lwpid_t in sys/procfs.h... yes checking for psaddr_t in sys/procfs.h... yes checking for prgregset_t in sys/procfs.h... yes checking for prfpregset_t in sys/procfs.h... yes checking whether prfpregset_t type is broken... yes checking for elf_fpregset_t in sys/procfs.h... yes checking for libthread_db... -lthread_db updating cache ./config.cache creating ./config.status creating Makefile creating config.h after make... frank@ruhe:file gdbserver gdbserver: ELF 32-bit LSB executable, ARM, version 1 (ARM), for GNU/Linux 2.0.0, dynamically linked (uses shared libs), not stripped ------------------------------------------------------- Ok, then I start gdbserver and connect with gdb. (gdb) target remote 192.168.0.127:2222 Remote debugging using 192.168.0.127:2222 0x000080e0 in _start () (gdb) c Continuing. # Program received signal SIGSEGV, Segmentation fault. 0x0000f354 in __sigsuspend (set=0xbffffc48) at ../sysdeps/unix/sysv/linux/sigsuspend.c:55 55 ../sysdeps/unix/sysv/linux/sigsuspend.c: Datei oder Verzeichnis nicht gefunden. in ../sysdeps/unix/sysv/linux/sigsuspend.c (gdb) bt #0 0x0000f354 in __sigsuspend (set=0xbffffc48) at ../sysdeps/unix/sysv/linux/sigsuspend.c:55 #1 0x0000a7c4 in __pthread_wait_for_restart_signal (self=0x85b20) at pthread.c:942 #2 0x00008690 in pthread_join (thread_id=1026, thread_return=0x0) at restart.h:36 #3 0x00008240 in main (argc=1, argv=0xbffffde4) at test.c:17 (gdb) nothing about the thread. What can I do? Thanks for any answer Frank Benoit ( benoit at tionex dot de )