This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Need help with gas directive .cfi_sections


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]