This is the mail archive of the
mailing list for the elfutils project.
Re: [PATCH] libdwfl: Make sure to set the CFI return register only once (for ppc64).
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: elfutils-devel at lists dot fedorahosted dot org
- Date: Wed, 25 Dec 2013 20:02:28 +0100
- Subject: Re: [PATCH] libdwfl: Make sure to set the CFI return register only once (for ppc64).
On Sat, 21 Dec 2013 21:56:35 +0100, Mark Wielaard wrote:
> On PPC64 there are two DWARF registers numbers that can represent the
> same register. If that register is the CIE return register then we only
> want to set it once. The second setting will confuse the unwinder.
OK with the patch. It is ugly but I do not know anything better.
BTW some description of the 65 vs. 108 issue is in gdb/rs6000-tdep.c:
/* GCC releases before 3.4 use GCC internal register numbering in
.debug_frame (and .debug_info, et cetera). The numbering is
different from the standard SysV numbering for everything except
for GPRs and FPRs. We can not detect this problem in most cases
- to get accurate debug info for variables living in lr, ctr, v0,
et cetera, use a newer version of GCC. But we must detect
one important case - lr is in column 65 in .debug_frame output,
instead of 108.
GCC 3.4, and the "hammer" branch, have a related problem. They
record lr register saves in .debug_frame as 108, but still record
the return column as 65. We fix that up too.
We can do this because 65 is assigned to fpsr, and GCC never
generates debug info referring to it. To add support for
handwritten debug info that restores fpsr, we would need to add a
producer version check to this. */