diff mbox

Don't emit entry_value/call_site stuff if -gstrict-dwarf (PR bootstrap/48153)

Message ID 20110316232011.GO30899@tyan-ft48-01.lab.bos.redhat.com
State New
Headers show

Commit Message

Jakub Jelinek March 16, 2011, 11:20 p.m. UTC
Hi!

As usually, Apple dwarf tools crash when seeing the new extensions
and I forgot to guard all their output with !dwarf_strict (if it is accepted
for DWARF 5 it will of course be changed into
dwarf_version >= 5 || !dwarf_strict).

Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux,
tested on a short testcase that with -gstrict-dwarf we don't emit
any of them.  Ok for trunk?

2011-03-17  Jakub Jelinek  <jakub@redhat.com>

	PR bootstrap/48153
	* dwarf2out.c (mem_loc_descriptor) <case ENTRY_VALUE>: Return NULL
	if dwarf_strict.
	(gen_subprogram_die): Don't add call_site DIEs if dwarf_strict.
	Clear call_arg_locations and call_arg_loc_last always.


	Jakub

Comments

Richard Henderson March 17, 2011, 2:51 p.m. UTC | #1
On 03/16/2011 04:20 PM, Jakub Jelinek wrote:
> 	PR bootstrap/48153
> 	* dwarf2out.c (mem_loc_descriptor) <case ENTRY_VALUE>: Return NULL
> 	if dwarf_strict.
> 	(gen_subprogram_die): Don't add call_site DIEs if dwarf_strict.
> 	Clear call_arg_locations and call_arg_loc_last always.

Ok.


r~
diff mbox

Patch

--- gcc/dwarf2out.c.jj	2011-03-16 17:28:36.000000000 +0100
+++ gcc/dwarf2out.c	2011-03-16 21:32:35.657483621 +0100
@@ -13864,6 +13864,8 @@  mem_loc_descriptor (rtx rtl, enum machin
       return 0;
 
     case ENTRY_VALUE:
+      if (dwarf_strict)
+	return NULL;
       mem_loc_result = new_loc_descr (DW_OP_GNU_entry_value, 0, 0);
       mem_loc_result->dw_loc_oprnd1.val_class = dw_val_class_loc;
       if (REG_P (ENTRY_VALUE_EXP (rtl)))
@@ -19447,7 +19449,7 @@  gen_subprogram_die (tree decl, dw_die_re
       current_function_has_inlines = 0;
       decls_for_scope (outer_scope, subr_die, 0);
 
-      if (call_arg_locations)
+      if (call_arg_locations && !dwarf_strict)
 	{
 	  struct call_arg_loc_node *ca_loc;
 	  for (ca_loc = call_arg_locations; ca_loc; ca_loc = ca_loc->next)
@@ -19547,11 +19549,12 @@  gen_subprogram_die (tree decl, dw_die_re
 		    tail_call_site_note_count++;
 		}
 	    }
-	  call_arg_locations = NULL;
-	  call_arg_loc_last = NULL;
 	}
+      call_arg_locations = NULL;
+      call_arg_loc_last = NULL;
       if (tail_call_site_count >= 0
-	  && tail_call_site_count == tail_call_site_note_count)
+	  && tail_call_site_count == tail_call_site_note_count
+	  && !dwarf_strict)
 	{
 	  if (call_site_count >= 0
 	      && call_site_count == call_site_note_count)