From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19988 invoked by alias); 19 Nov 2004 14:42:23 -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 19895 invoked from network); 19 Nov 2004 14:42:08 -0000 Received: from unknown (HELO kharon.iss.org.ua) (212.109.61.230) by sourceware.org with SMTP; 19 Nov 2004 14:42:08 -0000 Received: from Vladimir (gizmo.iss.org.ua [212.109.61.228]) by kharon.iss.org.ua (8.13.1/8.13.1) with ESMTP id iAJEiKnL092743; Fri, 19 Nov 2004 16:44:20 +0200 (EET) (envelope-from vladimir.vorobyov@iss.org.ua) Content-Type: text/plain; charset="iso-8859-1" From: Vladimir Vorobyov Organization: ISS To: Daniel Jacobowitz Subject: Re: pthreads debug with gdbserver Date: Fri, 19 Nov 2004 15:59:00 -0000 User-Agent: KMail/1.4.3 Cc: gdb@sources.redhat.com References: <200411191233.22357.vladimir.vorobyov@iss.org.ua> <20041119142238.GA13372@nevyn.them.org> In-Reply-To: <20041119142238.GA13372@nevyn.them.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200411191641.15822.vladimir.vorobyov@iss.org.ua> X-SW-Source: 2004-11/txt/msg00199.txt.bz2 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? > > Next, what libthread_db.so is for? It was not included for compilation > > for m68k target and I added it manually but when I try to load all > > libraries manually using add-symbol-file, every library loads fine exce= pt > > libthread_db.so - gdbserver reports "gbd: error initializing thread_db > > library." > > If I type in gdb: > > info threads > > I always get only one thread. > > p.s. All libraries are not stripped. > > libthread_db.so is necessary to debug threads. It has to be on your > target (sounds like it is) and it has to be able to initialize; worry > about this after you've figured out whether GDB loaded shared > libraries, because it will not be able to initialize unless GDB can > load an unstripped copy of libpthread.so. 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 i= t=20 to load shared libs ? When I do this I got "gbd: error initializing thread_db library." error on = the=20 target. When I add debug info to it, I see that error is "Incompatible=20 versions of libpthread and libthread_db". But these two libs are from the=20 same libc. It looks like this is my second problem. Or it depends on first one and may= =20 disappear when first problem is solved? Regards, Vladimir.