This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 10/14] make dwarf_expr_frame_base_1 public
- From: Tom Tromey <tromey at redhat dot com>
- To: gdb-patches at sourceware dot org
- Cc: Tom Tromey <tromey at redhat dot com>
- Date: Fri, 16 May 2014 09:26:31 -0600
- Subject: [PATCH 10/14] make dwarf_expr_frame_base_1 public
- Authentication-results: sourceware.org; auth=none
- References: <1400253995-12333-1-git-send-email-tromey at redhat dot com>
This exports dwarf_expr_frame_base_1 so that other code can use it.
2014-05-16 Tom Tromey <tromey@redhat.com>
* 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