summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/dwarf2/expr.c11
-rw-r--r--gdb/dwarf2/expr.h4
-rw-r--r--gdb/dwarf2/frame.c12
3 files changed, 12 insertions, 15 deletions
diff --git a/gdb/dwarf2/expr.c b/gdb/dwarf2/expr.c
index 8ebc1dfdfe4..15164babdd6 100644
--- a/gdb/dwarf2/expr.c
+++ b/gdb/dwarf2/expr.c
@@ -104,17 +104,6 @@ ill_formed_expression ()
error (_("Ill-formed DWARF expression"));
}
-/* See expr.h. */
-
-CORE_ADDR
-read_addr_from_reg (frame_info *frame, int reg)
-{
- struct gdbarch *gdbarch = get_frame_arch (frame);
- int regnum = dwarf_reg_to_regnum_or_error (gdbarch, reg);
-
- return address_from_register (regnum, frame);
-}
-
/* Read register REGNUM's contents in a given FRAME context.
The data read is offsetted by OFFSET, and the number of bytes read
diff --git a/gdb/dwarf2/expr.h b/gdb/dwarf2/expr.h
index df097f8867d..955fc84f441 100644
--- a/gdb/dwarf2/expr.h
+++ b/gdb/dwarf2/expr.h
@@ -51,10 +51,6 @@ value *dwarf2_evaluate (const gdb_byte *addr, size_t len, bool as_lval,
ADDR_SIZE is expected size of the type. */
type *address_type (gdbarch *arch, int addr_size);
-/* Return the value of register number REG (a DWARF register number),
- read as an address in a given FRAME. */
-CORE_ADDR read_addr_from_reg (frame_info *frame, int reg);
-
/* Check that the current operator is either at the end of an
expression, or that it is followed by a composition operator or by
DW_OP_GNU_uninit (which should terminate the expression). */
diff --git a/gdb/dwarf2/frame.c b/gdb/dwarf2/frame.c
index f97387a9d71..e17b36e243b 100644
--- a/gdb/dwarf2/frame.c
+++ b/gdb/dwarf2/frame.c
@@ -193,6 +193,18 @@ dwarf2_frame_state::dwarf2_frame_state (CORE_ADDR pc_, struct dwarf2_cie *cie)
{
}
+/* Return the value of register number REG (a DWARF register number),
+ read as an address in a given FRAME. */
+
+static CORE_ADDR
+read_addr_from_reg (frame_info *frame, int reg)
+{
+ gdbarch *arch = get_frame_arch (frame);
+ int regnum = dwarf_reg_to_regnum_or_error (arch, reg);
+
+ return address_from_register (regnum, frame);
+}
+
/* Execute the required actions for both the DW_CFA_restore and
DW_CFA_restore_extended instructions. */
static void