From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27767 invoked by alias); 23 Mar 2004 16:55:43 -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 27751 invoked from network); 23 Mar 2004 16:55:33 -0000 Received: from unknown (HELO fela.ch) (62.167.9.67) by sources.redhat.com with SMTP; 23 Mar 2004 16:55:33 -0000 Received: from 192.168.139.154 (DHCP154 [192.168.139.154]) by fela.ch (8.9.3/8.9.3) with ESMTP id RAA28767; Tue, 23 Mar 2004 17:55:19 +0100 From: Lukas Heiniger Organization: Fela Management AG To: Daniel Jacobowitz Subject: Re: SIGTRAP or SIG32 when remote debugging threads Date: Tue, 23 Mar 2004 19:25:00 -0000 User-Agent: KMail/1.5.4 Cc: gdb@sources.redhat.com References: <200403191107.34202.lukas.heiniger@fela.ch> <200403220947.46105.lukas.heiniger@fela.ch> <20040322142216.GA19284@nevyn.them.org> In-Reply-To: <20040322142216.GA19284@nevyn.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200403231755.46001.lukas.heiniger@fela.ch> X-SW-Source: 2004-03/txt/msg00210.txt.bz2 On Monday 22 March 2004 15:22, Daniel Jacobowitz wrote: > On Mon, Mar 22, 2004 at 09:47:46AM +0100, Lukas Heiniger wrote: > > On Friday 19 March 2004 18:28, Daniel Jacobowitz wrote: > > > On Fri, Mar 19, 2004 at 11:07:34AM +0100, Lukas Heiniger wrote: > > > > I'm trying to do thread debugging on an arm7 target with a gdb 6.0 > > > > snapshot and gdbserver. I've been searching this list for two days > > > > now but haven't found an answer to my problem. > > > > > > Have you set solib-absolute-prefix? It doesn't look like it. > > > > Thanks > > > > I do have set solib-absolute-prefix to .../target_fs > > > > where target_fs contains a copy of the target file system (including /lib > > and /usr/lib ...) > > > > solib-search-path is not set, however. I tried various combinations with > > solib-search-path and solib-absolute-prefix but still I always get > > > > Program received signal SIG32, Real-time event 32. > > 0x40088534 in ?? () > > You may have to debug GDB to find out why it is not loading shared > libraries then. Did that and it helped. It seems that the problem was that I specified the inferior with 'symbol-file' only. exec_bfd wasn't set then, and no libraries were loaded. Now I specify the file with 'exec-file' or when starting gdb. Besides that, some of the libraries in /lib were stripped. However some things are still suspicious if you look at my last session: -- lheiniger@linux:/home/hynix/arm/bin> arm-linux-gdb /home/hynix/app GNU gdb 20040318 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-pc-linux-gnu --target=arm-linux"... (gdb) target remote /dev/ttyS0 Remote debugging using /dev/ttyS0 0x40002570 in ?? () (gdb) set solib-absolute-prefix /home/hynix/arm/arm-linux (gdb) set solib-absolute-prefix /home/hynix/arm/arm-linux (gdb) c Continuing. Program received signal SIG32, Real-time event 32. 0x40088534 in ?? () (gdb) set solib-absolute-prefix /home/hynix/arm/arm-linux Reading symbols from /home/hynix/arm/arm-linux/lib/libm.so.6...done. Loaded symbols for /home/hynix/arm/arm-linux/lib/libm.so.6 Reading symbols from /home/hynix/arm/arm-linux/lib/libpthread.so.0...done. Loaded symbols for /home/hynix/arm/arm-linux/lib/libpthread.so.0 Reading symbols from /home/hynix/arm/arm-linux/lib/libc.so.6...done. Loaded symbols for /home/hynix/arm/arm-linux/lib/libc.so.6 Reading symbols from /home/hynix/arm/arm-linux/lib/ld-linux.so.2...done. Loaded symbols for /home/hynix/arm/arm-linux/lib/ld-linux.so.2 (gdb) i threads 3 Thread 1026 0x400e1ee4 in getegid () from /home/hynix/arm/arm-linux/lib/ libc.so.6 2 Thread 2049 0x400fa7b8 in tcsetattr (fd=1, optional_actions=1, termios_p=0x0) at ../sysdeps/unix/sysv/linux/tcsetattr.c:92 1 Thread 1024 0x40088534 in __sigsuspend (set=0xbffffc6c) at ../sysdeps/ unix/sysv/linux/sigsuspend.c:54 (gdb) l vcif_RxThread ... (gdb) b 712 Breakpoint 1 at 0x201fc30: file ASFINAG/vcif/src/vcif.c, line 712. (gdb) c Continuing. [New Thread 8201] [Switching to Thread 8201] Breakpoint 1, vcif_RxThread (Dummy=0x0) at vcif.c:712 712 BytesRead = read(s_UartDevice, Buf, READ_SIZE); (gdb) -- 1. Why does gdb wait with loading the libraries until I 'set solib-absolute-prefix...' after the first SIG32 instead of loading them in the first place? 2. The files referenced in threads 2 and 1 seem to be host files. They are not part of the target filesys. I had a breakpoint in solib_open and every library that was loaded seemed to be available in the path set with 'solib-absolute-prefix'. Why does it still refer to host files? Any Ideas? Thanks Lukas Heiniger