From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8244 invoked by alias); 8 Apr 2004 21:30:07 -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 8227 invoked from network); 8 Apr 2004 21:30:06 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 8 Apr 2004 21:30:06 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i38LU6ME029985 for ; Thu, 8 Apr 2004 17:30:06 -0400 Received: from localhost.redhat.com (to-dhcp51.toronto.redhat.com [172.16.14.151]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i38LU5j16789; Thu, 8 Apr 2004 17:30:06 -0400 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 7C17E2B9C; Thu, 8 Apr 2004 17:30:06 -0400 (EDT) Message-ID: <4075C45E.50005@gnu.org> Date: Thu, 08 Apr 2004 21:30:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-GB; rv:1.4.1) Gecko/20040217 MIME-Version: 1.0 To: Roland McGrath Cc: gdb-patches@sources.redhat.com Subject: Re: [KLUDGE PATCH] Linux vsyscall DSO support References: <200404082109.i38L9h5o010821@magilla.sf.frob.com> In-Reply-To: <200404082109.i38L9h5o010821@magilla.sf.frob.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-04/txt/msg00196.txt.bz2 Roland, FYI. Last time this was discussed the observer was identified as the correct mechanim for hooking this in. That's why I'm currently overhauling that code. Andrew > Perhaps you recall the discussion here some months back about what hook to > use in Linux targets for the detection of the vsyscall DSO. The last time > I asked here about a resolution on how best to do this, I got no feedback. > I hope we can now jumpstart the effort to find the right way to implement > this. To get things rolling again, here is a patch that I am not > suggesting for inclusion, but does work. This is a kludge to overload the > solib hooks with target-specific code. These solib hooks get called at > roughly (or perhaps even precisely?) the correct places where the vsyscall > DSO checks ought to happen. A reminder, the appropriate places are when > gdb thinks the address space might be a fresh layout from what it knows, > i.e. first attach (or any attach?), after exec, and on opening a core file. > > As I said, this code works for me. (It requires symbol_file_add_from_memory, > which is in the patch I just re-posted.) It seems doubtful this is the > ultimately desireable approach to wedging this code in where needs to be. > But it's what I've got, and as I said I'm still waiting for more feedback to > conclude on exactly what the preferred better thing to do is. > >