Initial conversion of dwarf_expr_ctx
authorTom Tromey <tom@tromey.com>
Sun, 25 Sep 2016 22:28:03 +0000 (16:28 -0600)
committerTom Tromey <tom@tromey.com>
Fri, 21 Oct 2016 20:17:37 +0000 (14:17 -0600)
commit718b962660007c529f4ff4c5e940119da21e05a7
treeaec64a64fc7753e25948ddc5555b989a359853bd
parent5841433461e2ce9da41292a49af4cc3c6b1e1f2d
Initial conversion of dwarf_expr_ctx

This is the first step in the conversion of dwarf_expr_ctx to a C++
class.  This conversion is done in steps to make the patches, and the
reviews, a bit simpler.  This patch changes dwarf_expr_ctx to be
stack-allocated and removes the associated cleanup.

2016-10-21  Tom Tromey  <tom@tromey.com>

* dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Stack-allocate
dwarf_expr_context.  Remove cleanups.
(dwarf2_locexpr_baton_eval)
(dwarf2_loc_desc_get_symbol_read_needs):  Likewise.
* dwarf2expr.h (dwarf_expr_context, ~dwarf_expr_context): Add
constructors and destructors.
(new_dwarf_expr_context, free_dwarf_expr_context)
(make_cleanup_free_dwarf_expr_context): Don't declare.
* dwarf2-frame.c (execute_stack_op): Stack-allocate
dwarf_expr_context.  Remove cleanups.
(dwarf_expr_context): Rename from new_dwarf_expr_context.  Turn
into constructor.
(free_dwarf_expr_context, free_dwarf_expr_context_cleanup):
Remove.
(~dwarf_expr_context): Rename from
make_cleanup_free_dwarf_expr_context.  Turn into destructor.
gdb/ChangeLog
gdb/dwarf2-frame.c
gdb/dwarf2expr.c
gdb/dwarf2expr.h
gdb/dwarf2loc.c