Re: [rfa/6.0] Better handle unspecified CFI values

Daniel Jacobowitz
2003-09-09T03:30:54Z

On Mon, Sep 08, 2003 at 08:12:23PM -0400, Andrew Cagney wrote:
> >On Fri, Sep 05, 2003 at 08:57:57PM -0400, Andrew Cagney wrote:
> >
>
> >>- delete the SP_REGNUM hack from the REG_UNDEFINED rule (it's no longer
> >>needed, I think)
> >
> >
> >Leaving the hack in REG_UNSPECIFIED? Yes, I'm pretty sure you're
> >right.
>
> Yes, leaving the hack in REG_UNSPECIFIED - I know that one's needed :-)
>
> >>- add a check/complaint for the SP v CFA problem.
> >
> >
> >Could you hold off on the complaint until there's a valid way to
> >specify the SP in the unwind information? Right now there isn't one,
> >as I described on the dwarf2 list three weeks ago.
>
> Arrrrgh. So "sp" should be specified as the same value as the "cfa"
> register?

Yes - normally. On S/390, stdcall, et cetera (anywhere where the hack
would be wrong) it gets even worse. We can only compute expressions
describing a memory location where the register is saved, not computed
values. For stack pointers (and maybe frame pointers on some
architectures?) this isn't good enough.

Thanks for addressing this!

--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer