> In dwarf2out.c : dwarf2out_frame_init we have this code:
>
> #ifdef DWARF2_UNWIND_INFO
> if (DWARF2_UNWIND_INFO)
> initial_return_save (INCOMING_RETURN_ADDR_RTX);
> #endif
>
> However, gdb really needs that slot to unwind stack frames when
> debugging, on targets that don't use dwarf2 unwinding (i.e. cygwin
> with -gdwarf-2, and some embedded targets that still use sjlj). Why
> don't we unconditionally emit this?
We ran into this problem recently too. I think that the correct predicate is
#ifdef DWARF2_UNWIND_INFO
if (DWARF2_UNWIND_INFO || DWARF2_FRAME_INFO)
initial_return_save (INCOMING_RETURN_ADDR_RTX);
#endif
--
Eric Botcazou