mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-27 01:28:46 +00:00
* dwarf2loc.c (dwarf2_evaluate_loc_desc): Make a cleanup.
(dwarf2_loc_desc_needs_frame): Likewise. * dwarf2expr.h (make_cleanup_free_dwarf_expr_context): Declare. * dwarf2expr.c (free_dwarf_expr_context_cleanup): New function. (make_cleanup_free_dwarf_expr_context): Likewise. * dwarf2-frame.c (execute_stack_op): Make a cleanup.
This commit is contained in:
@@ -61,6 +61,22 @@ free_dwarf_expr_context (struct dwarf_expr_context *ctx)
|
||||
xfree (ctx);
|
||||
}
|
||||
|
||||
/* Helper for make_cleanup_free_dwarf_expr_context. */
|
||||
|
||||
static void
|
||||
free_dwarf_expr_context_cleanup (void *arg)
|
||||
{
|
||||
free_dwarf_expr_context (arg);
|
||||
}
|
||||
|
||||
/* Return a cleanup that calls free_dwarf_expr_context. */
|
||||
|
||||
struct cleanup *
|
||||
make_cleanup_free_dwarf_expr_context (struct dwarf_expr_context *ctx)
|
||||
{
|
||||
return make_cleanup (free_dwarf_expr_context_cleanup, ctx);
|
||||
}
|
||||
|
||||
/* Expand the memory allocated to CTX's stack to contain at least
|
||||
NEED more elements than are currently used. */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user