From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8959 invoked by alias); 4 Oct 2003 22:01:12 -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 8952 invoked from network); 4 Oct 2003 22:01:11 -0000 Received: from unknown (HELO gateway.sf.frob.com) (64.81.54.130) by sources.redhat.com with SMTP; 4 Oct 2003 22:01:11 -0000 Received: from magilla.sf.frob.com (magilla.sf.frob.com [198.49.250.228]) by gateway.sf.frob.com (Postfix) with ESMTP id A8918357B; Sat, 4 Oct 2003 15:01:10 -0700 (PDT) Received: from magilla.sf.frob.com (localhost.localdomain [127.0.0.1]) by magilla.sf.frob.com (8.12.9/8.12.9) with ESMTP id h94M1AN2028281; Sat, 4 Oct 2003 15:01:10 -0700 Received: (from roland@localhost) by magilla.sf.frob.com (8.12.9/8.12.9/Submit) id h94M19l9028218; Sat, 4 Oct 2003 15:01:09 -0700 Date: Sat, 04 Oct 2003 22:01:00 -0000 Message-Id: <200310042201.h94M19l9028218@magilla.sf.frob.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit From: Roland McGrath To: Daniel Jacobowitz Cc: Jim Blandy , gdb-patches@sources.redhat.com Subject: Re: unwind support for Linux 2.6 vsyscall DSO In-Reply-To: Daniel Jacobowitz's message of Saturday, 4 October 2003 17:14:42 -0400 <20031004211441.GA24371@nevyn.them.org> X-Shopping-List: (1) Transient honey (2) Nosy grievous putty (3) Beauteous rice expulsions (4) Humorous riots X-SW-Source: 2003-10/txt/msg00092.txt.bz2 > Yes, since this is when solibs are normally loaded anyway. Ok. I was concerned that it might just try to look at the shell, where its symbols wouldn't match and it would just ignore those errors. Getting the auxv information will always work, but could be wrong information if there is another exec, so that would not be as resilient as SOLIB_ADD now is. To wit, infrun.c:1352: case TARGET_WAITKIND_LOADED: /* Ignore gracefully during startup of the inferior, as it might be the shell which has just loaded some objects, otherwise add the symbols for the newly loaded objects. */ If this comment is accurate and I'm understanding its context correctly, the problem I just described is in fact a problem. > An issue is whether it gets called early enough, i.e. before the > dynamic linker breakpoint is hit, or at all for static applications. > We'll have to see. Indeed, it doesn't look to me like it is, except for the attach case. Aside from attach_command, all the SOLIB_ADD calls in infrun.c are conditional on some kind of "shlib loaded" event. I am presuming those don't happen at exec. Incidentally, I'm also noticing another case we haven't been discussing directly. In addition to the core, attach, and run scenarios, there is "follow exec" apparently. I ran across this in looking for the earliest places insert_breakpoints is called, which seems like around the same time the auxv examination and vsyscall DSO setup should be done. Thanks, Roland