[Dwarf-discuss] Using CFI to end a backtrace

Daniel Jacobowitz drow
Tue Mar 15 22:10:20 GMT 2005


On Tue, Mar 15, 2005 at 12:23:12PM -0500, Andrew Cagney wrote:
> Check the archives, I proposed something similar some time ago.  Both 
> the return address, and the CFA column are candidates.

Ah, found it.  Do you think having the CFA undefined adds additional
expressive power?  Should the debugger treat either undefined as an
end-of-trace?

> 
> Daniel Jacobowitz wrote:
> >Several times recently I have wanted a "clean" way to indicate to GDB
> >that a backtrace was over - give up, go away, nothing more to see here.
> >This is useful in startup code, kernel exception handlers, et cetera.
> >There's no immediately obvious way to use .debug_frame for this;
> >however, it seems to me that marking the return address column as
> >DW_CFA_undefined should do what I want.  If we can't find the return
> >address, then there's no point in unwinding further.
> >
> >Does this interpretation make sense?  If so, should it be documented,
> >so that others don't need to reinvent it?
> 
> 
> 

-- 
Daniel Jacobowitz
CodeSourcery, LLC




More information about the Dwarf-discuss mailing list