This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Need help with gas directive .cfi_sections
- From: Daniel Jacobowitz <drow at false dot org>
- To: Sharyathi Nagesh <sharyath at in dot ibm dot com>
- Cc: binutils at sourceware dot org, jakub at redhat dot com, Mohan Kumar M <mohan at in dot ibm dot com>
- Date: Thu, 19 Nov 2009 22:50:18 -0500
- Subject: Re: Need help with gas directive .cfi_sections
- References: <4B055EFF.2080701@in.ibm.com>
On Thu, Nov 19, 2009 at 08:36:39PM +0530, Sharyathi Nagesh wrote:
> We need some help and guidance with some issues we are facing. We
> are exploring option to unwind through linux kernel dumps using dwarf
> information. Major challenge we are facing is with respect to
> unwinding through the exception framework. Even through exception
> handler code has gas directive to emit debug information (x86 &
> x86_64) by default it works only with .eh_frame. Earlier we had
> observed that relying on eh_frame to unwind is not reliable and hence
> we are exploring .debug_frame.
What's wrong with using .eh_frame? You can mix this with
.debug_frame, you don't need .cfi_sections unless you want to strip
.eh_frame from the runtime image.
> .global test1
> test1:
> .cfi_startproc
> .cfi_signal_frame
> .cfi_sections .debug_frame
> .cfi_def_cfa_offset 8
> .cfi_def_cfa r3, 4
> .cfi_endproc
> mr 10,9
> blr
CFI instructions apply to the current location. Put them at the
points in the program where they belong, and gas will give you correct
output.
--
Daniel Jacobowitz
CodeSourcery