From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@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 15:26:00 -0000 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-SW-Source: 2014-05/txt/msg00291.txt.bz2 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. */ -- 1.9.0