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: [PATCH] Fix DW_AT_frame_base with -fdwarf2-cfi-asm


On Mon, Jun 01, 2009 at 12:50:20PM +0200, Jakub Jelinek wrote:
> On Mon, Jun 01, 2009 at 11:40:05AM +0200, Jakub Jelinek wrote:
> > 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?
> 
> Here is the patch I'm bootstrapping/regtesting:

Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk/4.4?

> 2009-06-01  Jakub Jelinek  <jakub@redhat.com>
> 
> 	* dwarf2out.c (dwarf2out_cfi_label): Add FORCE argument, if true,
> 	force output of the label even for dwarf2out_do_cfi_asm.
> 	(add_fde_cfi): If -g2 and above and cfi might change CFA,
> 	force creation of CFI label and chain DW_CFA_set_loc jumping to it
> 	for convert_cfa_to_fb_loc_list.  Adjust other dwarf2out_cfi_label
> 	caller.
> 	(dwarf2out_stack_adjust, dwarf2out_frame_debug,
> 	dwarf2out_begin_epilogue, dwarf2out_frame_debug_restore_state): Adjust
> 	dwarf2out_cfi_label callers.
> 	* tree.h (dwarf2out_cfi_label): Adjust prototype.
> 	* config/arm/arm.c (thumb_pushpop, thumb1_output_function_prologue):
> 	Adjust dwarf2out_cfi_label callers.
> 	* config/vax/vax.c (vax_output_function_prologue): Likewise.

	Jakub


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