From patchwork Fri May 16 15:26:31 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 965 Return-Path: X-Original-To: siddhesh@wilcox.dreamhost.com Delivered-To: siddhesh@wilcox.dreamhost.com Received: from homiemail-mx20.g.dreamhost.com (mx2.sub5.homie.mail.dreamhost.com [208.113.200.128]) by wilcox.dreamhost.com (Postfix) with ESMTP id 8089F36007B for ; Fri, 16 May 2014 08:27:27 -0700 (PDT) Received: by homiemail-mx20.g.dreamhost.com (Postfix, from userid 14314964) id 4592241CA6BAA; Fri, 16 May 2014 08:27:27 -0700 (PDT) X-Original-To: gdb@patchwork.siddhesh.in Delivered-To: x14314964@homiemail-mx20.g.dreamhost.com Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by homiemail-mx20.g.dreamhost.com (Postfix) with ESMTPS id 1FE3141DC3D56 for ; Fri, 16 May 2014 08:27:27 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references; q=dns; s=default; b=fcn6h6+BS4T4bI/lCyLEdmgXuim49P5 h76Z/dtnYak6iIQMnaIRJzvLBp5XbgNgduMZC8Htr0djJJVHOytVoONoJEFsXBeU WUUcGJSOSrlDAjRcnimRXvLohGnUZltLNo+zedMbz/g4bKjezhQ+F+McaKt/2o8E 5y1jX162L1Do= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references; s=default; bh=ygByHgenNU0fkmsIIXSsxzXyHZw=; b=XinhI Uva4b0hbin5U4Dpqp1Yr5lEH2q37A4cC21SLLwfC2+eDFZWUM1x5gRb8fXkmZ2hb Rsg1tMOjY1uXQcecQZk/Q3fnjsL3dxTJoNg5iBNflq03hV6SEbxyAMJkv4Q5Bnfc pVvZTSEkyUKrpLHjXNZntB93wgVjpQY8Y38pFM= Received: (qmail 15792 invoked by alias); 16 May 2014 15:26:48 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 15609 invoked by uid 89); 16 May 2014 15:26:47 -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, RP_MATCHES_RCVD, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 16 May 2014 15:26:46 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s4GFQiFN010253 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 16 May 2014 11:26:45 -0400 Received: from barimba.redhat.com (ovpn-113-182.phx2.redhat.com [10.3.113.182]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s4GFQcVC006849; Fri, 16 May 2014 11:26:44 -0400 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH 10/14] make dwarf_expr_frame_base_1 public Date: Fri, 16 May 2014 09:26:31 -0600 Message-Id: <1400253995-12333-11-git-send-email-tromey@redhat.com> In-Reply-To: <1400253995-12333-1-git-send-email-tromey@redhat.com> References: <1400253995-12333-1-git-send-email-tromey@redhat.com> X-DH-Original-To: gdb@patchwork.siddhesh.in This exports dwarf_expr_frame_base_1 so that other code can use it. 2014-05-16 Tom Tromey * dwarf2loc.h (dwarf_expr_frame_base_1): Declare. * dwarf2loc.c (dwarf_expr_frame_base_1): Now public. --- gdb/ChangeLog | 5 +++++ gdb/dwarf2loc.c | 7 +++---- gdb/dwarf2loc.h | 10 ++++++++++ 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/gdb/dwarf2loc.c b/gdb/dwarf2loc.c index 2002ef9..e6652c5 100644 --- a/gdb/dwarf2loc.c +++ b/gdb/dwarf2loc.c @@ -44,9 +44,6 @@ extern int dwarf2_always_disassemble; -static void dwarf_expr_frame_base_1 (struct symbol *framefunc, CORE_ADDR pc, - const gdb_byte **start, size_t *length); - static const struct dwarf_expr_context_funcs dwarf_expr_ctx_funcs; static struct value *dwarf2_evaluate_loc_desc_full (struct type *type, @@ -414,7 +411,9 @@ const struct symbol_block_ops dwarf2_block_frame_base_loclist_funcs = loclist_find_frame_base_location }; -static void +/* See dwarf2loc.h. */ + +void dwarf_expr_frame_base_1 (struct symbol *framefunc, CORE_ADDR pc, const gdb_byte **start, size_t *length) { diff --git a/gdb/dwarf2loc.h b/gdb/dwarf2loc.h index 8ad5fa9..341f64d 100644 --- a/gdb/dwarf2loc.h +++ b/gdb/dwarf2loc.h @@ -80,6 +80,16 @@ extern const gdb_byte *dwarf2_fetch_constant_bytes (sect_offset, struct type *dwarf2_get_die_type (cu_offset die_offset, struct dwarf2_per_cu_data *per_cu); +/* Find the frame base information for FRAMEFUNC at PC. START is an + out parameter which is set to point to the DWARF expression to + compute. LENGTH is an out parameter which is set to the length of + the DWARF expression. This throws an exception on error or if an + expression is not found; the returned length will never be + zero. */ + +extern void dwarf_expr_frame_base_1 (struct symbol *framefunc, CORE_ADDR pc, + const gdb_byte **start, size_t *length); + /* Evaluate a location description, starting at DATA and with length SIZE, to find the current location of variable of TYPE in the context of FRAME. */