This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: unwind info for epilogues


On Mon, Jun 01, 2009 at 12:24:36AM -0700, Paul Pluzhnikov wrote:
> > From:?Richard Henderson <rth@redhat.com>
> > To:?gcc-patches@gcc.gnu.org
> > Date:?Fri, 29 May 2009 17:42:12 -0700
> ...
> > ? ? ? ?* cfgcleanup.c (try_crossjump_to_edge): Only skip past
> > ? ? ? ?NOTE_INSN_BASIC_BLOCK.
> > ? ? ? ?* cfglayout.c (duplicate_insn_chain): Copy epilogue insn marks.
> > ? ? ? ?Duplicate NOTE_INSN_EPILOGUE_BEG notes.
> > ? ? ? ?* cfgrtl.c (can_delete_note_p): Allow NOTE_INSN_EPILOGUE_BEG
> > ? ? ? ?to be deleted.
> 
> AFAICT, above patch broke debug info: I get 1100+ failures in GDB test
> suite with current trunk (@148029) on Linux/x86_64.
> 
> The problem appears to be that DW_AT_frame_base is no longer correctly
> emitted (which then causes GDB to assign wrong addresses to all
> locals). Given this code:
> 
> int foo(int x)
> {
>    return x+42;
> }

This seems not to be a bug in this weekend's patch, but a general
problem with -fdwarf2-cfi-asm (so something that needs to be fixed there
too).  convert_cfa_to_fb_loc_list can't work properly with .cfi_* directives
in their current shape.  The only time convert_cfa_to_fb_loc_list actually
appends something to the location lists for frame base is when
      case DW_CFA_set_loc:
      case DW_CFA_advance_loc1:
      case DW_CFA_advance_loc2:
      case DW_CFA_advance_loc4:
but those aren't ever added when using .cfi_* directives (and what's worse,
we don't emit labels at those instructions).

I'll try to fix this, but could the dwarf3 consumers in the mean time
implement DW_OP_call_frame_cfa, pretty please, preferrably yesterday?

	Jakub


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