From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22714 invoked by alias); 10 Oct 2013 16:31:27 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 22703 invoked by uid 89); 10 Oct 2013 16:31:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-vb0-f54.google.com Received: from mail-vb0-f54.google.com (HELO mail-vb0-f54.google.com) (209.85.212.54) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 10 Oct 2013 16:31:25 +0000 Received: by mail-vb0-f54.google.com with SMTP id q14so1794221vbe.41 for ; Thu, 10 Oct 2013 09:31:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=s9DuOTDEbZBX7UXkfMeLUhtz+95TigO4KM8Dy7uA5+4=; b=lsm8qK/i/cxm3svhvdbdtJEGTLeeYGEnb9w3cfcWY6dQCO4NOEN7655vSN9jEHdja7 m/sUrG2+/nDwkOX+APYfWM2WYlTGmKigkQwW33wd++5Fyll9jB72NH+WByCAPI6E831U 5FMn7iCcCYkeis+p/Ae5nBB4Rc4sNJbrMk/mk4sZODItqlrttZRZqhn/CPZGIEP9ebf7 5qvlV2J8dvHloNrhS0cRNX9DSLC00/MoSVVd1/2jDdlOqQwDFI/JmCb9L+utIQnFH01s FZ8Dl14i27VovwFGUjg+cUOuVipBLLJiXWdu2CuWB8jnOH9a49dYMbGXadxqvfR5iQI+ wVhw== X-Gm-Message-State: ALoCoQmcd3vLnpqvdVQTA+5p+I6yxzLjZNHejoqU15s+eLphv/kn3rUEB6oMtRpW8hyD832AIVnDIRaB+I4M0LwSeWpQ4zx1DN+hDnx3U1jN13kehuoLhH4bqLbCayJ/nwjgCdcvGLthd3OT9toIotAUglVxjVli5jdWPlLO1r6bhLKD71nkYKd0q/ehU71//7ULs4LTKfi/VXHrEjWkhnO8qe9wFRNmPQ== MIME-Version: 1.0 X-Received: by 10.52.118.177 with SMTP id kn17mr7175106vdb.84.1381422683071; Thu, 10 Oct 2013 09:31:23 -0700 (PDT) Received: by 10.52.37.138 with HTTP; Thu, 10 Oct 2013 09:31:22 -0700 (PDT) In-Reply-To: <20131010045819.GL3092@adacore.com> References: <20130926084713.GA11031@host2.jankratochvil.net> <20131009144629.GC27355@host2.jankratochvil.net> <20131010045819.GL3092@adacore.com> Date: Thu, 10 Oct 2013 16:31:00 -0000 Message-ID: Subject: Re: [patchv2] Record objfile->original_name as an absolute path From: Doug Evans To: Joel Brobecker Cc: Jan Kratochvil , gdb-patches Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes X-SW-Source: 2013-10/txt/msg00348.txt.bz2 On Wed, Oct 9, 2013 at 9:58 PM, Joel Brobecker wrote: >> > +/* Cheezy hack to prevent set_initial_language from trying to look up main. >> > + We do this so that gdb won't try to open the dwp file when the file is >> > + first selected. This gives us a chance to do a chdir before attempting >> > + to access the debug info. */ >> > +asm (".globl main.main"); >> > +asm ("main.main: .byte 0"); >> > + >> > int >> > main (int argc, char **argv) >> > { >> >> People are actually ok with this? > > FWIW, I tend to be a little less demanding in the testsuite. > But the first question is whether there is another alternative. > Is there? I was thinking, We have auto-solib-add and sharedlibrary. We just need something like that for symfile_objfile. [I realize it's a bit different. What I mean is we need a way to stop gdb from auto-loading symbols and then a command to load the symbols at a later point. The catch here is that we need gdb to already know about the file (we need to exercise whatever path gets set in the objfile) - we just need to defer loading symbols until after we get gdb to cd to a different directory.] I'm trying to think of a use-case beyond the testsuite to better justify having such a feature. [One could do something to defer setting the initial language, but that's just one reason why gdb might want to load symbols immediately.]