From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 383 invoked by alias); 20 Nov 2004 12:29:56 -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 305 invoked from network); 20 Nov 2004 12:29:45 -0000 Received: from unknown (HELO kharon.iss.org.ua) (212.109.61.230) by sourceware.org with SMTP; 20 Nov 2004 12:29:45 -0000 Received: from Vladimir (kesl4.iss.org.ua [192.168.1.5]) by kharon.iss.org.ua (8.13.1/8.13.1) with ESMTP id iAKCSgEa014235; Sat, 20 Nov 2004 14:28:54 +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: Sat, 20 Nov 2004 16:42:00 -0000 User-Agent: KMail/1.4.3 Cc: gdb@sources.redhat.com References: <200411191233.22357.vladimir.vorobyov@iss.org.ua> <200411191641.15822.vladimir.vorobyov@iss.org.ua> <20041120013220.GB27485@nevyn.them.org> In-Reply-To: <20041120013220.GB27485@nevyn.them.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200411201427.13557.vladimir.vorobyov@iss.org.ua> X-SW-Source: 2004-11/txt/msg00206.txt.bz2 Thank for your inputs. I moved further - see below. > > 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. As I said in my first message the breakpoint is hit exactly 3 times. I foun= d=20 that current_sos in solib-svr4.c can not find any libraries. It was because= =20 first_link_map_member returned NULL. After this I found that=20 SVR4_FETCH_LINK_MAP_OFFSETS did not return correct offsets (which are corre= ct=20 for me? ilp32?). I tried to follow those gdbach_data calls but it was too=20 difficult. I just assigned svr4_ilp32_fetch_link_map_offsets to=20 SVR4_FETCH_LINK_MAP_OFFSETS (how to do it correctly?). After this with every shlib breakpoint hit gdb loads appropriate shared lib= =20 BUT gdbserver reports "Target does not support breakpoints" 3 times for eac= h=20 library loaded. What does it mean ?=20 I still receive SIG32, info threads still shows only one thread. "info shar= ed"=20 shows all libraries that are loaded and td_ta_new() call now returns=20 successfully. > > 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? Absolutely. Regards, Vladimir.