This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: -g broken for DWARF2 on x86 platforms
- To: jkj at sco dot com (J. Kean Johnston), egcs at cygnus dot com, gcc2 at cygnus dot com
- Subject: Re: -g broken for DWARF2 on x86 platforms
- From: Jason Merrill <jason at cygnus dot com>
- Date: 25 Nov 1997 23:55:30 -0800
- References: <9711252223.AA27881@vlsi1.ultra.nyu.edu><19971125160134.55448.cygnus.egcs@sco.com>
>>>>> 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. */