From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26859 invoked by alias); 2 Oct 2003 06:26:09 -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 26845 invoked from network); 2 Oct 2003 06:26:02 -0000 Received: from unknown (HELO fed1mtao04.cox.net) (68.6.19.241) by sources.redhat.com with SMTP; 2 Oct 2003 06:26:02 -0000 Received: from ip68-98-8-92.ph.ph.cox.net ([68.98.8.92]) by fed1mtao04.cox.net (InterMail vM.5.01.06.05 201-253-122-130-105-20030824) with SMTP id <20031002062559.QXRC7393.fed1mtao04.cox.net@ip68-98-8-92.ph.ph.cox.net> for ; Thu, 2 Oct 2003 02:25:59 -0400 Received: (qmail 12606 invoked from network); 2 Oct 2003 06:29:02 -0000 Received: from localhost (HELO cox.net) (127.0.0.1) by localhost with SMTP; 2 Oct 2003 06:29:02 -0000 Message-ID: <3F7BC5AD.9020706@cox.net> Date: Thu, 02 Oct 2003 06:26:00 -0000 From: Stephen & Linda Smith User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Kevin Buettner CC: gdb Subject: Re: Shared libraries and the solib interface References: <3F7BA58F.9050803@cox.net> <1031002054312.ZM15015@localhost.localdomain> In-Reply-To: <1031002054312.ZM15015@localhost.localdomain> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-10/txt/msg00051.txt.bz2 Kevin Buettner wrote: >This approach can be used even if the dynamic linker doesn't provide a >convenient function (or even an inconvenient function) to set a >breakpoint on. In such a case, the stub is presumably informed via >other means of the fact that a shared library has just been loaded. >The stub could stop and tell GDB that it's just hit a fake "shared >library loaded" breakpoint. Your solib backend (on the GDB side) and >the stub would have to agree on some suitable address to use for this >purpose. There is some risk associated with lying to GDB in such a >manner, but this risk is mitigated by the fact that users don't >usually stop at these internal breakpoints. [Setting >``stop-on-solib-events'' does allow the user to stop though. Once you get >the basic machinery going, you'll want to remember to test with this >setting to make sure it's not too badly broken. It can, at times, be >extremely useful to allow a user-level stop when a solib related >breakpoint has been hit.] > > Do you know of an example of this? And a second question is how does a generic stub inform the GDB (workstation side) app which shared library got loaded and where or is this not necessary? >There are other approaches that could be used, but most of these would >involve adding code to other (generic) portions of gdb. Since it's >more difficult to get approval for changes to generic code, it's probably >best to stick with mechanisms which are already in use by other targets. > > Yeah, that's where I crashed and burned last time. >HTH, > >Kevin > > > >