From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cagney To: Randolph Chung Cc: gdb-patches@sources.redhat.com Subject: Re: [patch/rfa/hppa] Use frame pointer for unwinding Date: Mon, 17 May 2004 15:13:00 -0000 Message-id: <40A8D692.7080902@gnu.org> References: <20040516020703.GZ566@tausq.org> <40A78B63.9020102@gnu.org> <20040516170257.GM566@tausq.org> X-SW-Source: 2004-05/msg00487.html 26. alloca_frame (bit 35): This bit is set if alloca() is used and has been inlined. This indicates gr3 or gr4 may contain the previous sp value. For some reason this latter flag is named differently in the gdb sources compared to what's in the documentation. (feel free to fix) 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? (more followups to come) Andrew