This is the mail archive of the gcc@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]

Re: -g broken for DWARF2 on x86 platforms


>>>>> J Kean Johnston <jkj@sco.com> writes:

> I think it would be more constructive if we could actually look at
> solving the problem, rather than bickering about what option invokes it.

Try this:

Tue Nov 25 22:43:30 1997  Jason Merrill  <jason@yorick.cygnus.com>

	* dwarfout.c (output_type): If finalizing, write out nested types 
	of types we've already written.

Index: dwarfout.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gcc/dwarfout.c,v
retrieving revision 1.73
diff -c -r1.73 dwarfout.c
*** dwarfout.c	1997/11/12 17:12:21	1.73
--- dwarfout.c	1997/11/26 06:45:02
***************
*** 4208,4214 ****
    type = type_main_variant (type);
  
    if (TREE_ASM_WRITTEN (type))
!     return;
  
    /* If this is a nested type whose containing class hasn't been
       written out yet, writing it out will cover this one, too.  */
--- 4208,4229 ----
    type = type_main_variant (type);
  
    if (TREE_ASM_WRITTEN (type))
!     {
!       if (finalizing && AGGREGATE_TYPE_P (type))
! 	{
! 	  register tree member;
! 
! 	  /* Some of our nested types might not have been defined when we
! 	     were written out before; force them out now.  */
! 
! 	  for (member = TYPE_FIELDS (type); member;
! 	       member = TREE_CHAIN (member))
! 	    if (TREE_CODE (member) == TYPE_DECL
! 		&& ! TREE_ASM_WRITTEN (TREE_TYPE (member)))
! 	      output_type (TREE_TYPE (member), containing_scope);
! 	}
!       return;
!     }
  
    /* If this is a nested type whose containing class hasn't been
       written out yet, writing it out will cover this one, too.  */




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