Re: [hppa] FYI: confusion in unwind descriptor field meaning

Randolph Chung
2005-11-12T03:32:48Z

>>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.

This is what I meant - on hppa, even without linker symbols, we can
still do prologue analysis because the ABI mandates unwind records. So
we can actually do unwinding more robustly based on the unwind records.
This is especially useful when you have mixed code compiled with
different flags and/or have been stripped.

We have this comment in hppa-tdep.c:

/* We used to use frame_func_unwind () to locate the beginning of the
function to pass to skip_prologue (). However, when objects are
compiled without debug symbols, frame_func_unwind can return the
wrong
function (or 0). We can do better than that by using unwind
records. */

>>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.

Yes, I saw some of the discussions about the new framework and I think
it's a very good thing. gdb on hppa-linux can do pretty good backtraces
now with optimized code. On hpux we still have some work to do. In
either case, as Mark pointed out, the code is rather ugly so doing some
cleanup with some more structure will be nice.

randolph
--
Randolph Chung
Debian GNU/Linux Developer, hppa/ia64 ports