Re: [PATCH] S/390 DWARF-2 CFI frame support

Mark Kettenis
2003-12-12T17:43:42Z

I've been thinking about this over the last few days, but I haven't
reached a conclusion yet.

I've considered per-architecture initialization of the unwind table
before. However, the things Richard Henderson says about treating
uninitialized columns as "same value" make sense. And as Ulrich
pointed out, it doesn't immediately solve our problems with the PC and
SP.

On the other hand, we should be able to introduce our own "rules" in
addition to the ones given by the DWARF2/3 specification. We could
add the following two:

* REG_RETURN_ADDRESS: Set the particular register to the return
address of the function.

* REG_CFA: Set the particular register to the call frame address.

We could even allow for an offset, such that we could specify rules
such as: set the ISA PC register to the return address plus an offset
of 8 bytes, or set the ISA SP register to the call frame address plus
minus an offset of 128 bytes. I might need such a facility for SPARC.

How does that sound?

In the meantime, I'm going to try to remove some of the PC and
SP-related hacks in dwarf2-frame.c and see what happens.

Mark