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/rfa/hppa] Use frame pointer for unwinding


> > Anyway, I spoke with Dave Anglin (hppa gcc maintainer) about this. The
> > problem is that currently gcc/binutils does not correctly implement the
> > alloca_frame bit. The frame pointer is maintained in the case of a
> > variable-sized frame, but there is no flag set in the unwind record, and
> > the frame layout is slightly different compared to the HP compiler. It's
> > one of the things that should be fixed in gcc eventually. Also Dave has
> > observed that the Save_SP bit is set only for gcc; with the HP compiler
> > this is not set. Finally, with the HP compiler the frame pointer can be
> > maintained either in r3 or r4. It's not clear yet how this works. Some
> > more experimentation/disassembling HP code is required :-( I will add
> > some comments to the code about this situation. 
> 
> Is there a GCC bug report for this?

No.  GCC has always used a different frame layout than HP and set
Save_SP to indicate that the frame has a frame pointer.  Whether it
is a bug to not set the alloca_frame bit is an open question given
the different layout.

Ada uses the HP unwind library to a limited extent for backtraces.  I
believe that the frame marker support that GCC provides for the saved
SP value is sufficient for the library to unwind an alloca frame
without the alloca_frame bit being set.  We only do this under hpux
for compatibility with the HP library.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)


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