This is the mail archive of the
mailing list for the GDB project.
Re: [PATCH] ARM: Eliminate EXTRA_FRAME_INFO & FRAME_FIND_SAVED_REGS
- From: Kevin Buettner <kevinb at redhat dot com>
- To: Richard dot Earnshaw at arm dot com
- Cc: Kevin Buettner <kevinb at redhat dot com>, gdb-patches at sources dot redhat dot com
- Date: Sun, 13 Jan 2002 10:24:26 -0700
- Subject: Re: [PATCH] ARM: Eliminate EXTRA_FRAME_INFO & FRAME_FIND_SAVED_REGS
- References: <200201131528.PAA21457@cam-mail2.cambridge.arm.com>
On Jan 13, 3:28pm, Richard Earnshaw wrote:
> > On Jan 12, 11:50am, Richard Earnshaw wrote:
> > > This patch eliminates the deprecated macros EXTRA_FRAME_INFO &
> > > FRAME_FIND_SAVED_REGS from the arm target support files and replaces them
> > > with the new methods for doing this.
> > I submitted a patch to do this last month. Unfortunately, the ARM
> > maintainers have not had a chance to review it yet.
> > See http://sources.redhat.com/ml/gdb-patches/2001-12/msg00397.html
> Hmm, it seems substantially the same as mine, but with a couple of minor
> 1) You don't seem to initialize the pointer fields in the static frame
> structure "prologue_cache".
My patch does this allocation in _initialize_arm_tdep() whereas yours
does it in check_prologue_cache() and save_prologue_cache().
> 2) Similarly you don't seem to be allocating the saved_regs for the
> caller_fi frame (arm_frame_chain). You do, however, allocate the
> 3) You have a cleanup for the extra_info allocated above, which I hadn't
> thought about. I think one is also needed for the saved_regs.
Are you sure? Here are what I believe to be the relevant lines from
the arm_frame_chain hunk:
+ 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);
saved_regs is being allocated and a cleanup is being created. Were you
perhaps refering to some other hunk?