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.