From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3009 invoked by alias); 29 Jan 2004 04:13:43 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 2999 invoked from network); 29 Jan 2004 04:13:42 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 29 Jan 2004 04:13:42 -0000 Received: from drow by nevyn.them.org with local (Exim 4.30 #1 (Debian)) id 1Am3Yi-0000PV-Vj for ; Wed, 28 Jan 2004 23:13:40 -0500 Date: Thu, 29 Jan 2004 04:13:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sources.redhat.com Subject: Re: hook to run on attach/exec? Message-ID: <20040129041340.GA1522@nevyn.them.org> Mail-Followup-To: gdb-patches@sources.redhat.com References: <200401290408.i0T48VrC001340@magilla.sf.frob.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200401290408.i0T48VrC001340@magilla.sf.frob.com> User-Agent: Mutt/1.5.1i X-SW-Source: 2004-01/txt/msg00735.txt.bz2 On Wed, Jan 28, 2004 at 08:08:31PM -0800, Roland McGrath wrote: > I read someone mention somewhere recently that a new hook might be in the > works to be the spot where PIE support would figure out where the > executable got loaded. Can someone give me the skinny? > > For vsyscall DSO detection, the hook I need goes at the same place, I > think. That is, a spot that gets run after an inferior execs (from "run" > or otherwise, skipping first "run" exec for the shell of course) or when > gdb attaches to an inferior or to a core dump image; i.e., whenever the > inferior's address space is freshly made or presumed to be. Those are the > times you need to figure out where a PIE actually resides in memory, and > also the times you need to figure out where a system-supplied DSO is. > > Last time I was looking into the vsyscall DSO support, it seemed like there > was no precisely appropriate hook already. But I didn't know exactly what > to do about adding one. Is my life easier now? Well, some PIE work is checked in on a branch; you can take a look at it and see. I don't remember whether Elena added such a hook. Right now, post_attach and post_startup_inferior for various targets together cover all the cases; that's what I'm using in my port of your patches to 6.0. Should this be a target hook, or an observer? -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer