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]

Add -fverbose-asm for constructor fields


This makes constructor tables in assembly output much easier to read.

Andrew.


2003-10-01  Andrew Haley  <aph@redhat.com>

	* varasm.c (output_constructor): Annotate constructor.

Index: varasm.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/varasm.c,v
retrieving revision 1.388
diff -c -2 -p -r1.388 varasm.c
*** varasm.c	29 Sep 2003 21:29:11 -0000	1.388
--- varasm.c	1 Oct 2003 13:11:33 -0000
*************** output_constructor (tree exp, unsigned H
*** 3873,3876 ****
--- 3873,3883 ----
  	index = TREE_PURPOSE (link);
  
+       if (field && flag_verbose_asm)
+ 	fprintf (asm_out_file, "%s %s:\n",
+ 		 ASM_COMMENT_START, 
+ 		 DECL_NAME (field) 
+ 		 ? IDENTIFIER_POINTER (DECL_NAME (field))
+ 		 : "<anonymous>");
+ 
        /* Eliminate the marker that makes a cast not be an lvalue.  */
        if (val != 0)


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