diff options
-rw-r--r-- | gdb/dwarf2/expr.c | 5 | ||||
-rw-r--r-- | gdb/dwarf2/expr.h | 3 | ||||
-rw-r--r-- | gdb/dwarf2/frame.c | 5 | ||||
-rw-r--r-- | gdb/dwarf2/loc.c | 8 |
4 files changed, 4 insertions, 17 deletions
diff --git a/gdb/dwarf2/expr.c b/gdb/dwarf2/expr.c index 0e992c1..4427c53 100644 --- a/gdb/dwarf2/expr.c +++ b/gdb/dwarf2/expr.c @@ -29,6 +29,7 @@ #include "dwarf2/expr.h" #include "dwarf2/loc.h" #include "dwarf2/read.h" +#include "frame.h" #include "gdbsupport/underlying.h" #include "gdbarch.h" @@ -1217,7 +1218,9 @@ dwarf_expr_context::execute_stack_op (const gdb_byte *op_ptr, break; case DW_OP_call_frame_cfa: - result = this->get_frame_cfa (); + ensure_have_frame (this->frame, "DW_OP_call_frame_cfa"); + + result = dwarf2_frame_cfa (this->frame); result_val = value_from_ulongest (address_type, result); in_stack_memory = true; break; diff --git a/gdb/dwarf2/expr.h b/gdb/dwarf2/expr.h index b227690..f1c931e 100644 --- a/gdb/dwarf2/expr.h +++ b/gdb/dwarf2/expr.h @@ -192,9 +192,6 @@ struct dwarf_expr_context /* Read LENGTH bytes at ADDR into BUF. */ virtual void read_mem (gdb_byte *buf, CORE_ADDR addr, size_t length) = 0; - /* Return the CFA for the frame. */ - virtual CORE_ADDR get_frame_cfa () = 0; - /* Return the PC for the frame. */ virtual CORE_ADDR get_frame_pc () { diff --git a/gdb/dwarf2/frame.c b/gdb/dwarf2/frame.c index 19915df..d7cc764 100644 --- a/gdb/dwarf2/frame.c +++ b/gdb/dwarf2/frame.c @@ -249,11 +249,6 @@ public: invalid ("DW_OP_push_object_address"); } - CORE_ADDR get_frame_cfa () override - { - invalid ("DW_OP_call_frame_cfa"); - } - CORE_ADDR get_tls_address (CORE_ADDR offset) override { invalid ("DW_OP_form_tls_address"); diff --git a/gdb/dwarf2/loc.c b/gdb/dwarf2/loc.c index d004ea5..723d9a4 100644 --- a/gdb/dwarf2/loc.c +++ b/gdb/dwarf2/loc.c @@ -699,14 +699,6 @@ public: struct dwarf2_per_cu_data *per_cu; CORE_ADDR obj_address; - /* Helper function for dwarf2_evaluate_loc_desc. Computes the CFA for - the frame in BATON. */ - - CORE_ADDR get_frame_cfa () override - { - return dwarf2_frame_cfa (frame); - } - /* Helper function for dwarf2_evaluate_loc_desc. Computes the PC for the frame in BATON. */ |