/* DWARF 2 Expression Evaluator. Copyright (C) 2001-2020 Free Software Foundation, Inc. Contributed by Daniel Berlin . This file is part of GDB. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #if !defined (DWARF2EXPR_H) #define DWARF2EXPR_H #include "leb128.h" #include "gdbtypes.h" struct dwarf2_per_objfile; /* Evaluate the expression at ADDR (LEN bytes long) in a given PER_CU FRAME context. The PER_OBJFILE contains a pointer to the PER_BFD information. ADDR_SIZE defines a size of the DWARF generic type. INIT_VALUES vector contains values that are expected to be pushed on a DWARF expression stack before the evaluation. AS_LVAL defines if the returned struct value is expected to be a value or a location description. Where TYPE, SUBOBJ_TYPE and SUBOBJ_OFFSET describe expected struct value representation of the evaluation result. The ADDR_INFO property can be specified to override the range of memory addresses with the passed in buffer. */ struct value *dwarf2_eval_exp (const gdb_byte *addr, size_t len, bool as_lval, struct dwarf2_per_objfile *per_objfile, struct dwarf2_per_cu_data *per_cu, struct frame_info *frame, int addr_size, std::vector *init_values, const struct property_addr_info *addr_info, struct type *type = nullptr, struct type *subobj_type = nullptr, LONGEST subobj_offset = 0); /* Return the address type used of the GDBARCH architecture and ADDR_SIZE is expected size of the type. */ struct type *address_type (struct gdbarch *gdbarch, int addr_size); /* Check that the current operator is either at the end of an expression, or that it is followed by a composition operator or by DW_OP_GNU_uninit (which should terminate the expression). */ void dwarf_expr_require_composition (const gdb_byte *, const gdb_byte *, const char *); /* If