From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14236 invoked by alias); 20 Nov 2004 01:32:33 -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 14206 invoked from network); 20 Nov 2004 01:32:21 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 20 Nov 2004 01:32:21 -0000 Received: from drow by nevyn.them.org with local (Exim 4.34 #1 (Debian)) id 1CVK6u-0007BI-NK; Fri, 19 Nov 2004 20:32:20 -0500 Date: Sat, 20 Nov 2004 10:01:00 -0000 From: Daniel Jacobowitz To: Vladimir Vorobyov Cc: gdb@sources.redhat.com Subject: Re: pthreads debug with gdbserver Message-ID: <20041120013220.GB27485@nevyn.them.org> Mail-Followup-To: Vladimir Vorobyov , gdb@sources.redhat.com References: <200411191233.22357.vladimir.vorobyov@iss.org.ua> <20041119142238.GA13372@nevyn.them.org> <200411191641.15822.vladimir.vorobyov@iss.org.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200411191641.15822.vladimir.vorobyov@iss.org.ua> User-Agent: Mutt/1.5.5.1+cvs20040105i X-SW-Source: 2004-11/txt/msg00204.txt.bz2 On Fri, Nov 19, 2004 at 04:41:15PM +0200, Vladimir Vorobyov wrote: > On Friday 19 November 2004 04:22 pm, Daniel Jacobowitz wrote: > > On Fri, Nov 19, 2004 at 12:33:22PM +0200, Vladimir Vorobyov wrote: > > > I see that shlib breakpoint is set and hit but gdb does not load the > > > libraries. I can see in strace that it successfully loads ld.so. What > > > should I look at? > > > "info shared". Maybe strace GDB to see what it's opening and whether > > it fails to find any files. > > info shared reports: "No shared libraries loaded at this time". > Straces shows that gdb opens only ld.so file. > When adding printf to solibopen it also shows only ld.so. > Who is responsible for loading shared libs ? What file/function/event? This usually means that the ld.so GDB has opened is not -exactly- the same as the one on your target; and then it has set the solib event breakpoint at the wrong location, and it hasn't been hit. Take a look at solib-svr4.c if you want more details. > Yes, the problem number one is that GDB does not auto loads shared libs. > Is it not the same when I manually add-symbol-file lipthread.so? Can I do it > to load shared libs ? > When I do this I got "gbd: error initializing thread_db library." error on the > target. When I add debug info to it, I see that error is "Incompatible > versions of libpthread and libthread_db". But these two libs are from the > same libc. > It looks like this is my second problem. Or it depends on first one and may > disappear when first problem is solved? Are you sure you loaded the right copy? -- Daniel Jacobowitz