------- Comment #38 from howarth at nitro dot med dot uc dot edu  2009-09-19 
16:31 -------
The solution we want to implement is described below...

-------------------------------------------------------
I dug into this.  Based on the .s files in bugzilla, the latest gcc is  
now adding dwarf unwind info to describe the function epilog.  If you  
run dwarfdump --eh-frame on the .o files made with the new compiler,  
you'll see extra dwarf unwind instructions at the end like:

                 ...
                 DW_CFA_advance_loc4 (64)  #<-- advance to near end of  
function
                 DW_CFA_restore (rbp)
                 DW_CFA_def_cfa (rsp, 8)
                 DW_CFA_nop
                 DW_CFA_nop

The linker's conversion to compact unwind "runs" the dwarf unwind info  
for a function and then records the state at the end.  Adding unwind  
info for the epilog breaks this.  In the long term, I can add  
heuristics to the linker to detect that what looks like unwind info  
for the epilog and stop processing the dwarf instructions.

The short term fix for gcc is to *not* add epilog unwind information  
for Darwin.

Epilog unwind information is never needed for exception processing.   
Its only use is for debugging or sampling when you want to  
asynchronously make a stack back trace.

-Nick
------------------------------------------------------


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41260

Reply via email to