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]

Revised patch to generate correct dwarf2 debugging info


I have revised the patch to correct the generation of dwarf2 debugging
informartion based on the comments I received on the previous version.
This patch allows gcc to generate correct debugging information for
parameters passed to inlined functions that are constant float,
double, or long long values.

2000-09-14  Will Cohen  <wcohen@redhat.com>

	* dwarf2out.c (add_const_value_attribute): Changed array into a
	xmalloced object, so it exists after function exit.
	(free_AT): Added case for dw_val_class_float to free allocated
	memory.

Is this okay to checkin?

-Will
Index: dwarf2out.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/dwarf2out.c,v
retrieving revision 1.203
diff -c -2 -p -r1.203 dwarf2out.c
*** dwarf2out.c	2000/09/11 01:50:45	1.203
--- dwarf2out.c	2000/09/15 12:47:02
*************** free_AT (a)
*** 4604,4607 ****
--- 4604,4611 ----
        break;
  
+     case dw_val_class_float:
+       free (a->dw_attr_val.v.val_float.array);
+       break;
+       
      default:
        break;
*************** add_const_value_attribute (die, rtl)
*** 7671,7675 ****
  	  {
  	    register unsigned length = GET_MODE_SIZE (mode) / sizeof (long);
! 	    long array[4];
  	    REAL_VALUE_TYPE rv;
  
--- 7675,7679 ----
  	  {
  	    register unsigned length = GET_MODE_SIZE (mode) / sizeof (long);
!  	    long *array = (long *) xmalloc (sizeof (long) * 4);
  	    REAL_VALUE_TYPE rv;
  

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