Files
binutils-gdb/gdb/dwarf2
Zoran Zaric 54ecae43a3 Remove dwarf_expr_context from expr.h interface
After the switch to the new evaluator implementation, it is now
possible to completely remove the dwarf_expr_context class from the
expr.h interface and encapsulate it inside the expr.c file.

The new interface consists of a new function called dwarf2_evaluate
that takes a DWARF expression stream, initial DWARF stack elements (in
a form of a vector of a struct value objects), evaluation context and
expected result type information. Function returns an evaluation result
in a form of a struct value object.

Currently, there is ever only one initial stack element provided to the
evaluator and that element is always a memory address, so having a
vector of struct value object might seems like an overkill.

In reality this new flexibility allows implementation of a new DWARF
attribute extensions that could provide any number of initial stack
elements to describe any location description or value.

gdb/ChangeLog:

	* dwarf2/expr.c (dwarf2_evaluate): New function.
	(struct dwarf_expr_context): Move from expr.h.
        (class dwarf_entry): Move from expr.h
	(dwarf_expr_context::push_address): Remove function.
	* dwarf2/expr.h (struct dwarf_expr_context): Move to expr.c.
        (class dwarf_entry): Move to expr.c.
        (address_type): Expose function.
	* dwarf2/frame.c (execute_stack_op): Now calls dwarf2_evaluate.
	* dwarf2/loc.c (dwarf2_evaluate_loc_desc_full): Now calls
	dwarf2_evaluate.
	(dwarf2_locexpr_baton_eval): Now calls dwarf2_evaluate.
2021-11-05 11:46:38 +00:00
..
2021-05-17 14:16:07 -06:00
2021-05-17 14:16:07 -06:00
2021-06-25 12:23:05 -06:00
2021-08-08 08:53:17 -06:00
2021-10-29 16:44:45 -04:00