[PATCH 03/30] Remove get_frame_cfa from dwarf_expr_context

Tom Tromey tom@tromey.com
Thu Jan 21 21:23:53 GMT 2021


>>>>> "Zoran" == Zoran Zaric via Gdb-patches <gdb-patches@sourceware.org> writes:

Zoran> Following the idea of merging the evaluators, the get_frame_cfa method
Zoran> can be moved from dwarf_expr_executor and dwarf_evaluate_loc_desc
Zoran> classes to their base class dwarf_expr_context. Once this is done,
Zoran> it becomes apparent that the method is only called once and it can be
Zoran> inlined.

Zoran> It is also necessary to check if the frame context information was
Zoran> provided before the DW_OP_call_frame_cfa operation is executed.

Zoran> gdb/ChangeLog:

Zoran> 	* dwarf2/expr.c (dwarf_expr_context::get_frame_cfa): Remove
Zoran> 	method.
Zoran> 	(dwarf_expr_context::execute_stack_op): Call frame context info
Zoran> 	check for DW_OP_call_frame_cfa. Remove use of get_frame_cfa.
Zoran> 	* dwarf2/expr.h (dwarf_expr_context::get_frame_cfa): Remove
Zoran> 	method.
Zoran> 	* dwarf2/frame.c (dwarf_expr_context::get_frame_cfa): Remove
Zoran> 	method.
Zoran> 	* dwarf2/loc.c (dwarf_expr_context::get_frame_cfa): Remove
Zoran> 	method.

Thank you for the patch.
This is ok.

Tom


More information about the Gdb-patches mailing list