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


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 
> differences.
> 
> 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 
> extra_info.
> 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?

Kevin


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