From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4889 invoked by alias); 21 Feb 2003 23:09:55 -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 4882 invoked from network); 21 Feb 2003 23:09:55 -0000 Received: from unknown (HELO kerberos.suse.cz) (195.47.106.10) by 172.16.49.205 with SMTP; 21 Feb 2003 23:09:55 -0000 Received: from chimera.suse.cz (chimera.suse.cz [10.20.0.2]) by kerberos.suse.cz (SuSE SMTP server) with ESMTP id 3639C59D33A; Sat, 22 Feb 2003 00:09:54 +0100 (CET) Received: from suse.cz (naga.suse.cz [10.20.1.16]) by chimera.suse.cz (8.11.0/8.11.0/SuSE Linux 8.11.0-0.4) with ESMTP id h1LN9s428481; Sat, 22 Feb 2003 00:09:54 +0100 X-Authentication-Warning: chimera.suse.cz: Host naga.suse.cz [10.20.1.16] claimed to be suse.cz Message-ID: <3E56B1C1.8090907@suse.cz> Date: Fri, 21 Feb 2003 23:09:00 -0000 From: Michal Ludvig Organization: SuSE CR User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021130 X-Accept-Language: cs, cz, en MIME-Version: 1.0 To: Daniel Jacobowitz Cc: GDB Patches Subject: Re: [RFA] Location list support References: <3E560801.6080703@suse.cz> <20030221171139.GA14877@nevyn.them.org> In-Reply-To: <20030221171139.GA14877@nevyn.them.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-02/txt/msg00534.txt.bz2 Daniel Jacobowitz wrote: > On Fri, Feb 21, 2003 at 12:05:37PM +0100, Michal Ludvig wrote: > >>Hi, >>attached is a patch that adds support for .debug_loc sections as >>generated by newer versions of GCC (eg. from rtlopt-branch). > > Let me try saying this again... Michal, are you watching GDB HEAD > development? Well, no, actually. I did this patch for gdb-5.3 since mainline for x86-64 is too broken to be usable (due to the merge between i386 and x86-64 targets). And since the patch for gdb-5.3 works pretty well I sent a straight mainline version port to the list. It's nothing personal, Daniel :-) > Have you been following my discussions with Jim about how > DW_AT_location should be supported? I didn't just ask you to wait for > the LOC_COMPUTED patch out of sheer pique. If you're not using that > mechanism, then you're defeating the whole purpose it was implemented > for. > > For instance, a good sized chunk of code you delete in the patch below > is no longer there. Be careful updating, since you copied that deleted > code to new functions; it shouldn't be there either. > > Basically, location lists should be represented as LOC_COMPUTED > symbols; the LOC_COMPUTED lookup mechanism should be updated to accept > a PC when computing the location. OK, so the .debug_loc parser will likely remain the same, new_symbol() will create variables with location lists as LOC_COMPUTED types and read_var_val() & Co. should compute the actual location depending on the current PC. Did I understand you correctly? Hm, it doesn't seem to be that much simpler that what I did. But I understand, that I should use LOC_COMPUTED once it's there. > The entire thing will be worlds > simpler than all the work you did below, and a heck of a lot less > fragile. You just need to parse the location lists, store them in the > location baton, and select a list to evaluate in dwarf2loc.c. If > there's no list entry for $pc, that's where you return optimized-out; > it might take another little change to accept an optimized-out result > there. If there is a list entry you evaluate it just like presently. Michal Ludvig -- * SuSE CR, s.r.o * mludvig@suse.cz * (+420) 296.545.373 * http://www.suse.cz