This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]