This is the mail archive of the gdb-patches@sourceware.cygnus.com mailing list for the GDB project.


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

Re: dwarf2 class handling patch


Ping?  Without this patch, gdb gets things wrong with the current gcc.

>>>>> Jason Merrill <jason@cygnus.com> writes:

 > The dwarf2 spec says that an incomplete type will have AT_declaration set.
 > Some changes I'm making to gcc will produce class DIEs with children that
 > should still be considered incomplete.

 > 1999-11-24  Jason Merrill  <jason@casey.cygnus.com>

 > 	* dwarf2read.c (die_is_declaration): New fn.
 > 	(read_structure_scope): Use it.

 > Index: dwarf2read.c
 > ===================================================================
 > RCS file: /cvs/cvsfiles/devo/gdb/dwarf2read.c,v
 > retrieving revision 2.33
 > diff -c -p -r2.33 dwarf2read.c
 > *** dwarf2read.c	1999/10/11 21:17:22	2.33
 > --- dwarf2read.c	1999/11/24 09:38:16
 > *************** static void set_cu_language PARAMS ((uns
 > *** 621,626 ****
 > --- 621,628 ----
 >   static struct attribute *dwarf_attr PARAMS ((struct die_info *,
 >   					     unsigned int));
  
 > + static int die_is_declaration PARAMS ((struct die_info *));
 > + 
 >   static void dwarf_decode_lines PARAMS ((unsigned int, char *, bfd *));
  
 >   static void dwarf2_start_subfile PARAMS ((char *, char *));
 > *************** read_structure_scope (die, objfile)
 > *** 2202,2208 ****
 >        type within the structure itself. */
 >     die->type = type;
  
 > !   if (die->has_children)
 >       {
 >         struct field_info fi;
 >         struct die_info *child_die;
 > --- 2204,2210 ----
 >        type within the structure itself. */
 >     die->type = type;
  
 > !   if (die->has_children && ! die_is_declaration (die))
 >       {
 >         struct field_info fi;
 >         struct die_info *child_die;
 > *************** dwarf_attr (die, name)
 > *** 3700,3705 ****
 > --- 3702,3715 ----
 >     return NULL;
 >   }
  
 > + static int
 > + die_is_declaration (die)
 > +      struct die_info *die;
 > + {
 > +   return (dwarf_attr (die, DW_AT_declaration)
 > + 	  && ! dwarf_attr (die, DW_AT_specification));
 > + }
 > + 
 >   /* Decode the line number information for the compilation unit whose
 >      line number info is at OFFSET in the .debug_line section.
 >      The compilation directory of the file is passed in COMP_DIR.  */

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