int entry_cfa_sp_offset_p;
};
-/* A cleanup that sets a pointer to NULL. */
-
-static void
-clear_pointer_cleanup (void *arg)
-{
- void **ptr = (void **) arg;
-
- *ptr = NULL;
-}
-
static struct dwarf2_frame_cache *
dwarf2_frame_cache (struct frame_info *this_frame, void **this_cache)
{
- struct cleanup *reset_cache_cleanup;
struct gdbarch *gdbarch = get_frame_arch (this_frame);
const int num_regs = gdbarch_num_regs (gdbarch)
+ gdbarch_num_pseudo_regs (gdbarch);
cache = FRAME_OBSTACK_ZALLOC (struct dwarf2_frame_cache);
cache->reg = FRAME_OBSTACK_CALLOC (num_regs, struct dwarf2_frame_state_reg);
*this_cache = cache;
- reset_cache_cleanup = make_cleanup (clear_pointer_cleanup, this_cache);
/* Unwind the PC.
if (ex.error == NOT_AVAILABLE_ERROR)
{
cache->unavailable_retaddr = 1;
- discard_cleanups (reset_cache_cleanup);
return cache;
}
&& fs.regs.reg[fs.retaddr_column].how == DWARF2_FRAME_REG_UNDEFINED)
cache->undefined_retaddr = 1;
- discard_cleanups (reset_cache_cleanup);
return cache;
}
set_objfile_data (objfile, dwarf2_frame_objfile_data, fde_table2);
}
-/* Provide a prototype to silence -Wmissing-prototypes. */
-void _initialize_dwarf2_frame (void);
-
void
_initialize_dwarf2_frame (void)
{
dwarf2_frame_objfile_data = register_objfile_data ();
#if GDB_SELF_TEST
- register_self_test_foreach_arch (selftests::execute_cfa_program_test);
+ selftests::register_test_foreach_arch ("execute_cfa_program",
+ selftests::execute_cfa_program_test);
#endif
}