From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16117 invoked by alias); 9 Oct 2003 23:04:14 -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 16095 invoked from network); 9 Oct 2003 23:04:06 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 9 Oct 2003 23:04:06 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id h99N46M22138 for ; Thu, 9 Oct 2003 19:04:06 -0400 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id h99N46c13742; Thu, 9 Oct 2003 19:04:06 -0400 Received: from localhost.localdomain (vpn50-39.rdu.redhat.com [172.16.50.39]) by pobox.corp.redhat.com (8.12.8/8.12.8) with ESMTP id h99N44dT013363; Thu, 9 Oct 2003 19:04:04 -0400 Received: (from kev@localhost) by localhost.localdomain (8.11.6/8.11.6) id h99N3wP14984; Thu, 9 Oct 2003 16:03:58 -0700 Date: Thu, 09 Oct 2003 23:04:00 -0000 From: Kevin Buettner Message-Id: <1031009230358.ZM14983@localhost.localdomain> In-Reply-To: Roland McGrath "Re: unwind support for Linux 2.6 vsyscall DSO" (Oct 9, 3:20pm) References: <200310092220.h99MKXvN010506@magilla.sf.frob.com> To: Roland McGrath , Jim Blandy Subject: Re: unwind support for Linux 2.6 vsyscall DSO Cc: Daniel Jacobowitz , Kevin Buettner , Elena Zannoni , gdb-patches@sources.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2003-10/txt/msg00334.txt.bz2 On Oct 9, 3:20pm, Roland McGrath wrote: > > Daniel Jacobowitz writes: > > > The problem with using SOLIB_ADD for this is that we can't SOLIB_ADD > > > safely till we hit the dynamic linker breakpoint, but it would be > > > _really_ nice to be able to load this object right after the inferior > > > starts (and for static binaries, etc etc). How would you suggets we do > > > that? > > > > Well, look, the whole association with SOLIB_ADD at all was just based > > on the intuition that "Hey, this vsyscall thing is like a shared > > library!" Nothing more profound than that. So if it turns out that > > sticking with SOLIB_ADD makes things complicated, then it'd be much > > better to just add calls to the core, attach, and run code, or > > whereever else is appropriate, that does things exactly the way you > > want. > > In the prior discussion I got the impression that SOLIB_ADD did happen > early enough (right after the exec stop), and just got repeated more times > later when there is actually anything in the dynamic linker's list. Is > that not accurate? SOLIB_ADD will only be called when the dynamic linker's "hey, I've just (un)loaded something new" breakpoint has been hit. (More precisely, this is the breakpoint placed at r_brk in the r_debug struct.) This occurs quite early in the execution of the program, but it might not be early enough. Also, as Daniel alludes, it won't happen at all for static binaries. Kevin