From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5235 invoked by alias); 31 Jan 2003 10:39:50 -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 5217 invoked from network); 31 Jan 2003 10:39:49 -0000 Received: from unknown (HELO mx1.redhat.com) (172.16.49.200) by 172.16.49.205 with SMTP; 31 Jan 2003 10:39:49 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id h0VAdnf29712 for ; Fri, 31 Jan 2003 05:39:49 -0500 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h0VAdna14171; Fri, 31 Jan 2003 05:39:49 -0500 Received: from localhost.localdomain (vpn50-31.rdu.redhat.com [172.16.50.31]) by pobox.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h0VAdmc23483; Fri, 31 Jan 2003 05:39:48 -0500 Received: (from kev@localhost) by localhost.localdomain (8.11.6/8.11.6) id h0VAdhf03247; Fri, 31 Jan 2003 03:39:43 -0700 Date: Fri, 31 Jan 2003 10:39:00 -0000 From: Kevin Buettner Message-Id: <1030131103942.ZM3246@localhost.localdomain> In-Reply-To: "Frank van Eijkelenburg" "RE: loading shared library" (Jan 31, 10:55am) References: To: "Gnu Debugger mailing list" , Subject: Re: loading shared library MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-01/txt/msg00529.txt.bz2 On Jan 31, 10:55am, Frank van Eijkelenburg wrote: > Subject: RE: loading shared library > > -----Original Message----- > > From: Kevin Buettner [mailto:kevinb@redhat.com] > > Sent: maandag 27 januari 2003 17:06 > > To: frank.van.eijkelenburg@technolution.nl; Gnu Debugger mailing list > > Subject: Re: loading shared library > > > > > > On Jan 27, 11:38am, Frank van Eijkelenburg wrote: > > > > > I don't understand why gdb tries to load a library from the host > > > (/lib/libpthread.so.0), while it needs the crosscompiled > > library from the > > > target. Or do I misunderstand something? > > > > You need to tell GDB where to find the shared libraries for the target. > > Use the ``set solib-absolute-prefix ...'' command to do this. > > > > Kevin > > I tried this, and it was working. At this moment I've upgraded my glibc on > the target from 2.1.3 to 2.2.4. I also build a complete toolchain with glibc > 2.2.4. Now I want to debug a simple multithreaded program remote. But the > following occured: > > GNU gdb 5.3 > Copyright 2002 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"... > 0x40002a70 in ?? () > (gdb) b 20 > Breakpoint 1 at 0x8590: file ex1.c, line 20. > (gdb) c > Continuing. > > Breakpoint 1, main () at ex1.c:26 > 26 retcode = pthread_create(&th_a, NULL, process, (void *) "a"); > (gdb) sharedlibrary > Reading symbols from /usr/arm/tools/arm-linux/lib/libpthread.so.0...done. > Ignoring packet error, continuing... > Loaded symbols for /usr/arm/tools/arm-linux/lib/libpthread.so.0 > Reading symbols from /usr/arm/tools/arm-linux/lib/libc.so.6...done. > Error while reading shared library symbols: > putpkt: write failed: Broken pipe. > Reading symbols from /usr/arm/tools/arm-linux/lib/ld-linux.so.2...done. > Error while reading shared library symbols: > putpkt: write failed: Broken pipe. > putpkt: write failed: Broken pipe. > (gdb) show solib-absolute-prefix > Prefix for loading absolute shared library symbol files is "/dev/null". > (gdb) show solib- > solib-absolute-prefix solib-search-path > (gdb) show solib-search-path > The search path for loading non-absolute shared library symbol files is > "/usr/arm/tools/arm-linux/lib". > (gdb) > > It's trying to load the right libraries, but fails on libpthread (I can load > the other two without any problems). Any idea of what's causing the > problem??? Check the following: 1) That libthread_db.so on the target is from the new glibc. 2) That your gdbserver (or rda) is built with the libthread_db.so from the new glibc. (This is kind of a long shot - so long as it's not statically linked it probably shouldn't matter.) 3) That libpthread.so on target and host (as found in /usr/arm/tools/arm-linux/lib/libpthread.so.0) are the same. Kevin