mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-26 17:18:55 +00:00
Remove empty frame and full evaluators
There are no virtual methods that require different specialization in dwarf_expr_context class. This means that derived classes dwarf_expr_executor and dwarf_evaluate_loc_desc are not needed any more. As a result of this, the evaluate_for_locexpr_baton class base class is now the dwarf_expr_context class. There might be a need for a better class hierarchy when we know more about the direction of the future DWARF versions and gdb extensions, but that is out of the scope of this patch series. gdb/ChangeLog: * dwarf2/frame.c (class dwarf_expr_executor): Remove class. (execute_stack_op): Instantiate dwarf_expr_context instead of dwarf_evaluate_loc_desc class. * dwarf2/loc.c (class dwarf_evaluate_loc_desc): Remove class. (dwarf2_evaluate_loc_desc_full): Instantiate dwarf_expr_context instead of dwarf_evaluate_loc_desc class. (struct evaluate_for_locexpr_baton): Derive from dwarf_expr_context.
This commit is contained in:
@@ -224,22 +224,6 @@ register %s (#%d) at %s"),
|
||||
}
|
||||
}
|
||||
|
||||
class dwarf_expr_executor : public dwarf_expr_context
|
||||
{
|
||||
public:
|
||||
|
||||
dwarf_expr_executor (dwarf2_per_objfile *per_objfile)
|
||||
: dwarf_expr_context (per_objfile)
|
||||
{}
|
||||
|
||||
private:
|
||||
|
||||
void invalid (const char *op) ATTRIBUTE_NORETURN
|
||||
{
|
||||
error (_("%s is invalid in this context"), op);
|
||||
}
|
||||
};
|
||||
|
||||
static CORE_ADDR
|
||||
execute_stack_op (const gdb_byte *exp, ULONGEST len, int addr_size,
|
||||
struct frame_info *this_frame, CORE_ADDR initial,
|
||||
@@ -247,7 +231,7 @@ execute_stack_op (const gdb_byte *exp, ULONGEST len, int addr_size,
|
||||
{
|
||||
CORE_ADDR result;
|
||||
|
||||
dwarf_expr_executor ctx (per_objfile);
|
||||
dwarf_expr_context ctx (per_objfile);
|
||||
scoped_value_mark free_values;
|
||||
|
||||
ctx.frame = this_frame;
|
||||
|
||||
Reference in New Issue
Block a user