From patchwork Fri Jun 20 15:57:50 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 1611 Received: (qmail 3738 invoked by alias); 20 Jun 2014 16:33:53 -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 3723 invoked by uid 89); 20 Jun 2014 16:33:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.8 required=5.0 tests=AWL, BAYES_00, SPF_HELO_PASS, SPF_PASS, T_RP_MATCHES_RCVD 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 (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 20 Jun 2014 16:33:52 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s5KFwCNH016112 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 20 Jun 2014 11:58:12 -0400 Received: from barimba.redhat.com (ovpn-113-103.phx2.redhat.com [10.3.113.103]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s5KFw53O015561; Fri, 20 Jun 2014 11:58:11 -0400 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH v2 10/14] make dwarf_expr_frame_base_1 public Date: Fri, 20 Jun 2014 09:57:50 -0600 Message-Id: <1403279874-23781-11-git-send-email-tromey@redhat.com> In-Reply-To: <1403279874-23781-1-git-send-email-tromey@redhat.com> References: <1403279874-23781-1-git-send-email-tromey@redhat.com> This exports dwarf_expr_frame_base_1 so that other code can use it. 2014-06-20 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 4275864..db3ee7d 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. */