aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2016-10-30 20:45:08 -0600
committerTom Tromey <tom@tromey.com>2016-11-02 16:01:38 -0600
commit7d5697f9e27f79e1decc1215f33088cee9f7d863 (patch)
tree7ed7870c449ffcde146aaa2f559a1a72c82698ab /gdb/dwarf2expr.c
parentEnable Intel AVX512_4VNNIW instructions (diff)
downloadbinutils-gdb-7d5697f9e27f79e1decc1215f33088cee9f7d863.tar.gz
binutils-gdb-7d5697f9e27f79e1decc1215f33088cee9f7d863.tar.bz2
binutils-gdb-7d5697f9e27f79e1decc1215f33088cee9f7d863.zip
Fix dwarf_expr_context method regressions
This fixes some regressions found in the patch to convert dwarf_expr_context to use methods. Specifically: * get_base_type could erroneously throw; this was rewritten to move the size checks into the only spot needing them. * Previously the "symbol needs frame" implementation reused th "cfa" function for the get_frame_pc slot; this reimplements it under the correct name. * Not enough members were saved and restored in one implementation of push_dwarf_reg_entry_value; this patch fixes this oversight and also takes the opportunity to remove an extraneous structure definition. 2016-11-02 Tom Tromey <tom@tromey.com> * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type): Rename from impl_get_base_type. Rewrite. (struct dwarf_expr_baton): Remove. (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value): Save and restore more fields. (symbol_needs_eval_context::get_frame_pc): New method. * dwarf2expr.h (dwarf_expr_context::get_base_type): Now public, virtual. (dwarf_expr_context::impl_get_base_type): Remove. * dwarf2expr.c (dwarf_expr_context::get_base_type): Remove.
Diffstat (limited to 'gdb/dwarf2expr.c')
-rw-r--r--gdb/dwarf2expr.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/gdb/dwarf2expr.c b/gdb/dwarf2expr.c
index a01d6d8e3a3..398ca0eac6a 100644
--- a/gdb/dwarf2expr.c
+++ b/gdb/dwarf2expr.c
@@ -406,22 +406,6 @@ base_types_equal_p (struct type *t1, struct type *t2)
return TYPE_LENGTH (t1) == TYPE_LENGTH (t2);
}
-/* A convenience function to call get_base_type and return the result.
- DIE is the DIE whose type we need. SIZE is non-zero if this
- function should verify that the resulting type has the correct
- size. */
-
-struct type *
-dwarf_expr_context::get_base_type (cu_offset die, int size)
-{
- struct type *result = this->impl_get_base_type (die);
- if (result == NULL)
- error (_("Could not find type for DW_OP_GNU_const_type"));
- if (size != 0 && TYPE_LENGTH (result) != size)
- error (_("DW_OP_GNU_const_type has different sizes for type and data"));
- return result;
-}
-
/* If <BUF..BUF_END] contains DW_FORM_block* with single DW_OP_reg* return the
DWARF register number. Otherwise return -1. */