[hppa] FYI: confusion in unwind descriptor field meaning

Jim Blandy jimb@red-bean.com
Sat Nov 12 04:22:00 GMT 2005


On 11/11/05, Randolph Chung <randolph@tausq.org> wrote:
> How do you find the end of the prologue without consulting the unwind
> data? Right now one heuristic is "scan the code until you hit a branch",
> which works but might mean you scan way too much code. I'm also not
> certain if this will work correctly for things like alloca, but it might.

This is a question all the prologue analyzers have to answer.  You can
either stop when you reach the current PC, or stop when you see an
instruction you don't recognize.

> For that matter, how do you find the beginning of the function without
> unwind data?

Linker symbols.  If you don't have them, then prologue analysis isn't useful.

> OTOH, if you can combine all the prologue analysis code in hppa-tdep.c
> and make it more robust, I think it will certainly be a good thing.

In my experience, the new analysis framework (which I've kind of been
forgetting about for a while now) makes things a lot more robust.  I
wrote it because I was getting fed up with corrupted backtraces
debugging GDB on the S/390.  With the new framework, I got a
multi-page backtrace through optimized code the first time.  It makes
a big difference.



More information about the Gdb-patches mailing list