From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16667 invoked by alias); 20 Nov 2004 16:42: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 16576 invoked from network); 20 Nov 2004 16:42:18 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sourceware.org with SMTP; 20 Nov 2004 16:42:18 -0000 Received: from drow by nevyn.them.org with local (Exim 4.34 #1 (Debian)) id 1CVYJO-0003xz-AP; Sat, 20 Nov 2004 11:42:10 -0500 Date: Sat, 20 Nov 2004 16:57:00 -0000 From: Daniel Jacobowitz To: Vladimir Vorobyov Cc: gdb@sources.redhat.com, Andreas Schwab Subject: Re: pthreads debug with gdbserver Message-ID: <20041120164209.GA15174@nevyn.them.org> Mail-Followup-To: Vladimir Vorobyov , gdb@sources.redhat.com, Andreas Schwab References: <200411191233.22357.vladimir.vorobyov@iss.org.ua> <200411191641.15822.vladimir.vorobyov@iss.org.ua> <20041120013220.GB27485@nevyn.them.org> <200411201427.13557.vladimir.vorobyov@iss.org.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200411201427.13557.vladimir.vorobyov@iss.org.ua> User-Agent: Mutt/1.5.5.1+cvs20040105i X-SW-Source: 2004-11/txt/msg00207.txt.bz2 On Sat, Nov 20, 2004 at 02:27:13PM +0200, Vladimir Vorobyov wrote: > 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 found > that current_sos in solib-svr4.c can not find any libraries. It was because > first_link_map_member returned NULL. After this I found that > SVR4_FETCH_LINK_MAP_OFFSETS did not return correct offsets (which are correct > for me? ilp32?). I tried to follow those gdbach_data calls but it was too > difficult. I just assigned svr4_ilp32_fetch_link_map_offsets to > SVR4_FETCH_LINK_MAP_OFFSETS (how to do it correctly?). > After this with every shlib breakpoint hit gdb loads appropriate shared lib > BUT gdbserver reports "Target does not support breakpoints" 3 times for each > library loaded. What does it mean ? > I still receive SIG32, info threads still shows only one thread. "info shared" > shows all libraries that are loaded and td_ta_new() call now returns > successfully. Take a look at the source code to gdbserver. Andreas, now I remember why I enabled thread_db support on a per-target basis - there are other support routines that have to be written. -- Daniel Jacobowitz