From 3c7c57cdc06412d9c81dcc2d89ff2ab4e4704708 Mon Sep 17 00:00:00 2001 From: Zoran Zaric Date: Tue, 15 Sep 2020 11:37:19 +0100 Subject: Move read_mem to dwarf_expr_context Following the idea of merging the evaluators, the read_mem method can be moved from dwarf_expr_executor and dwarf_evaluate_loc_desc classes to their base class dwarf_expr_context. gdb/ChangeLog: * dwarf2/expr.c (dwarf_expr_context::read_mem): Move from dwarf_evaluate_loc_desc. * dwarf2/frame.c (dwarf_expr_executor::read_mem): Remove method. * dwarf2/loc.c (dwarf_evaluate_loc_desc::read_mem): Move to dwarf_expr_context. --- gdb/dwarf2/expr.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'gdb/dwarf2/expr.c') diff --git a/gdb/dwarf2/expr.c b/gdb/dwarf2/expr.c index b13de98..dac693d 100644 --- a/gdb/dwarf2/expr.c +++ b/gdb/dwarf2/expr.c @@ -249,6 +249,15 @@ dwarf_expr_context::dwarf_call (cu_offset die_cu_off) this->eval (block.data, block.size); } +/* See expr.h. */ + +void +dwarf_expr_context::read_mem (gdb_byte *buf, CORE_ADDR addr, + size_t length) +{ + read_memory (addr, buf, length); +} + /* Require that TYPE be an integral type; throw an exception if not. */ static void -- cgit v1.1