This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [PATCH] ARM: Eliminate EXTRA_FRAME_INFO & FRAME_FIND_SAVED_REGS
> + caller_fi.saved_regs = (CORE_ADDR *) xcalloc (1, SIZEOF_FRAME_SAVED_REGS);
> + old_chain = make_cleanup (xfree, caller_fi.saved_regs);
> + caller_fi.extra_info = xcalloc (1, sizeof (struct frame_extra_info));
> + make_cleanup (xfree, caller_fi.extra_info);
That calloc() call caught my attention.
Just call frame_saved_regs_zalloc() and frame_obstack_alloc(). Since
all is on the frame obstack, worrying about cleanups is unnecessary.
I'll A.R.I. SIZEOF_FRAME_SAVED_REGS.
Andrew