From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12199 invoked by alias); 7 Apr 2002 00:41:26 -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 11966 invoked from network); 7 Apr 2002 00:41:25 -0000 Received: from unknown (HELO dberlin.org) (64.246.6.106) by sources.redhat.com with SMTP; 7 Apr 2002 00:41:25 -0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by dberlin.org (8.11.6/8.11.6) with ESMTP id g370eEm28056; Sat, 6 Apr 2002 19:40:14 -0500 Date: Sat, 06 Apr 2002 16:41:00 -0000 From: Daniel Berlin To: Andrew Cagney cc: gdb-patches@sources.redhat.com Subject: Re: [WIP]: LOC_COMPUTED and LOC_COMPUTED_ARG In-Reply-To: <3CAF9418.2090607@cygnus.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2002-04/txt/msg00240.txt.bz2 On Sat, 6 Apr 2002, Andrew Cagney wrote: > > + case DW_OP_fbreg: > > + { > > + struct symbol *framefunc; > > + unsigned char *datastart; > > + unsigned char *dataend; > > + struct dwarf_block *theblock; > > + struct locexpr_baton *baton; > > + > > + framefunc = get_frame_function (frame); > > + op_ptr = read_sleb128 (op_ptr, &offset); > > + baton = SYMBOL_LOCATION_BATON (framefunc); > > + theblock = &baton->locexpr; > > + datastart = theblock->data; > > + dataend = theblock->data + theblock->size; > > + result = execute_stack_op (var, datastart, dataend, frame, 0, NULL) + offset; > > + } > > + break; > > and > > > - the frame base address (for DW_OP_fbreg) > > > > > > Not possible. > > the frame base can be a location list. > > That's why it pulls it out of the frame function on the fly. > > Something I've never understood. Shouldn't frame_base be stored in > frame->base as part of the initial frame creation. Hence avoiding this > recursion? Theoretically you could, but it's sort of pointless. You still end up doing the same lookup. It also hides the code, since the code to create frames is nowhere near the dwarf2 reader. It makes it look like "magic" to someone looking at the evaluator. > > Andrew > >