This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [PATCH] S/390 DWARF-2 CFI frame support
- From: Ulrich Weigand <weigand at i1 dot informatik dot uni-erlangen dot de>
- To: kettenis at chello dot nl (Mark Kettenis)
- Cc: cagney at gnu dot org, weigand at i1 dot informatik dot uni-erlangen dot de, gdb-patches at sources dot redhat dot com, uweigand at de dot ibm dot com
- Date: Sat, 13 Dec 2003 16:32:12 +0100 (CET)
- Subject: Re: [PATCH] S/390 DWARF-2 CFI frame support
Mark Kettenis wrote:
> 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.
However, I rather like to see 'value not available' instead of
an incorrect value in an 'info reg' display. So if we do have
an arch-dependent callback, we might as well use ABI knowledge
to get this right.
> 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?
This would certainly solve the s390 situation.
> 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.
The only hack that cannot be replaced using the rules described
above (as far as I can see) is the
if (column == fs->retaddr_column)
continue;
in dwarf2_frame_cache. Does any platform rely on this behaviour?
Bye,
Ulrich
--
Dr. Ulrich Weigand
weigand@informatik.uni-erlangen.de