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: Richard Henderson <rth at redhat dot com>
- To: Ulrich Weigand <weigand at i1 dot informatik dot uni-erlangen dot de>
- Cc: gdb-patches at sources dot redhat dot com, uweigand at de dot ibm dot com
- Date: Thu, 4 Dec 2003 16:47:56 -0800
- Subject: Re: [PATCH] S/390 DWARF-2 CFI frame support
- References: <200312042009.VAA07733@faui1d.informatik.uni-erlangen.de>
On Thu, Dec 04, 2003 at 09:09:12PM +0100, Ulrich Weigand wrote:
> To fix this, I suggest the following. What GCC assumes to happen
> when it leaves a register unspecified in the CFI depends on whether
> the register is call-saved or call-clobbered according to the
> target's ABI. If it is call-saved (and unspecified), the function
> doesn't save/restore it because it does not in fact ever modify it.
> Thus, in this case the debugger should copy the value from the
> inner frame. If it is call-clobbered (those will always be left
> unspecified), it should be assumed undefined.
This is wrong. The debugger should just assume *all* registers
that are not explicitly saved are preserved. In the case of
call-clobbered registers, you just won't *know* that they are
actually dead. But so what? This is no worse than not having
location list information that tells you that a value is dead
after its register gets re-used for something else.
However, when I made this argument before, it wasn't good enough
for some people, and they added the annoying warning anyway.
r~