From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 696 invoked by alias); 24 Aug 2004 21:35:56 -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 682 invoked from network); 24 Aug 2004 21:35:55 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 24 Aug 2004 21:35:55 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i7OLZtS0021028 for ; Tue, 24 Aug 2004 17:35:55 -0400 Received: from zenia.home.redhat.com (porkchop.devel.redhat.com [172.16.58.2]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i7OLZra19910; Tue, 24 Aug 2004 17:35:54 -0400 To: gdb-patches@sources.redhat.com Subject: Re: RFC: Return piece lists from Dwarf expression evaluation References: From: Jim Blandy Date: Tue, 24 Aug 2004 21:35:00 -0000 In-Reply-To: Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2004-08/txt/msg00674.txt.bz2 Jim Blandy writes: > Jim Blandy writes: > > Here's an implementation of the dwarf2expr interface change I proposed > > on gdb@ last week. > > Here's a revision of that patch that properly handles the 'needs > frame' case. > > 2004-08-09 Jim Blandy > > * dwarf2expr.h (struct dwarf_expr_context): New members > 'num_pieces' and 'pieces', for returning the result of an > expression that uses DW_OP_piece. > (struct dwarf_expr_piece): New struct type. > * dwarf2expr.c (new_dwarf_expr_context): Initialize num_pieces and > pieces. > (free_dwarf_expr_context): Free pieces, if any. > (add_piece): New function. > (execute_stack_op): Implement DW_OP_piece. > * dwarf2loc.c (dwarf2_evaluate_loc_desc): If the result of the > expression is a list of pieces, print an error message. > (dwarf2_loc_desc_needs_frame): If the expression yields > pieces, and any piece is in a register, then we need a frame. I've committed this change.