Obscure .eh_frame debug info question.

Jakub Jelinek jakub at redhat.com
Tue May 19 16:24:52 UTC 2009


On Tue, May 19, 2009 at 11:40:54AM -0400, Tom Horsley wrote:
> I was just wondering if there is anyone out there in redhat
> land who can shed more light on the use of dwarf register 16
> for a virtual "return address" in .eh_frame info, probably
> hand generated .eh_frame info in the vicinity of the
> pthreads library mutex locking code.
> 

Does
http://sources.redhat.com/ml/libc-hacker/2006-09/msg00003.html
http://gcc.gnu.org/ml/gcc-patches/2006-03/msg00208.html
shed some light?  The lock spinning pads are in inline asm in separate
subsections (as they are unlikely) and at least before GCC started using
.cfi_* directives for eh it was impossible to write inline assembly with
code in separate sections/subsections that preserved usable unwind info.
The GCC patch as examples in the testcase contains both older version which
disassembled the instructions in the pad and computed virtual return address
to the spot that branched to the pad (and pad branched to at the end)
and the actually used version.

	Jakub




More information about the fedora-list mailing list