From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 530 invoked by alias); 2 Apr 2002 14:59:54 -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 522 invoked from network); 2 Apr 2002 14:59:53 -0000 Received: from unknown (HELO dberlin.org) (64.246.6.106) by sources.redhat.com with SMTP; 2 Apr 2002 14:59:53 -0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by dberlin.org (8.11.6/8.11.6) with ESMTP id g32Exqm04361; Tue, 2 Apr 2002 09:59:52 -0500 Date: Tue, 02 Apr 2002 06:59:00 -0000 From: Daniel Berlin To: Jim Blandy cc: gdb-patches@sources.redhat.com Subject: Re: [PATCH] Let dwarf2 CFI's execute_stack_op be used outside of CFI In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2002-04/txt/msg00021.txt.bz2 On 1 Apr 2002, Jim Blandy wrote: > > It may well be overengineered. A libdwarf is indeed what I had in > mind; I thought it might be nice to start putting together the pieces > for it. 1. The existing libdwarf is now LGPL'd, so it would be easier to just use that, if you wanted a dwarf reader (in fact, this is what the majority of consumers do use). It would make more sense to just implement what's missing (it contains no macro info reading, and no generic location expression support). 2. Ulrich Drepper has the beginnings of a GPL'd libdwarf already that works pretty well. > > Daniel Berlin writes: > > In particular, you just need some initial value, or no initial value, not > > a push object address value/other types of things that may get pushed to > > the front. > > Well, DW_AT_data_member_location expressions want the base address of > the innermost enclosing structure on the stack, whereas > DW_AT_use_location expressions want the pointer-to-member value and > the object's base address on the stack. So we've got situations which > need zero, one, and two values on the stack. So it seems like the > basic interface should let people push as much as they want. > > > Also, why would something need our evaluator if they already knew how to > > read DIE's at a given offset? It's very likely they can also evaluate > > expressions if they can read DWARF2 at all. > > Well, to share code, I guess. They'd toss their interpreter to use > ours, and spread the maintenance job around. I sincerely doubt they would do this. They gain nothing by conversion, but become dependent on us. :) > I have no clients in > mind, just general principle. When we've got something whose behavior > is well-specified with no reference to GDB, it just seems like good > practice to produce an implementation that, likewise, is independent > of GDB. > > > If, however, this is what GDB people want it to look like, i'll happily > > implement it. It's not like it'll be that much more work for me. > > I'd approve it. :) > I'll do it, i'm just concerned we are thinking of duplicating a library for the sake of duplicating a library. :) --Dan