]> Git Repo - binutils.git/blobdiff - gdb/dwarfread.c
Make all the libgdb objects even when building gdb. This is because
[binutils.git] / gdb / dwarfread.c
index 956fb7e6d59828c762d8bd16f5bfc10a86559746..15d2988f2969749bdea8232d7dbd37ecc8ebc2f4 100644 (file)
@@ -1,5 +1,5 @@
 /* DWARF debugging format support for GDB.
-   Copyright (C) 1991, 1992 Free Software Foundation, Inc.
+   Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
    Written by Fred Fish at Cygnus Support.  Portions based on dbxread.c,
    mipsread.c, coffread.c, and dwarfread.c from a Data General SVR4 gdb port.
 
@@ -56,7 +56,6 @@ other things to work on, if you get bored. :-)
 
 #include <fcntl.h>
 #include <string.h>
-#include <sys/types.h>
 
 #ifndef        NO_SYS_FILE
 #include <sys/file.h>
@@ -1997,7 +1996,13 @@ process_dies (thisdie, enddie, objfile)
          switch (di.die_tag)
            {
            case TAG_compile_unit:
-             read_file_scope (&di, thisdie, nextdie, objfile);
+             /* Skip Tag_compile_unit if we are already inside a compilation
+                unit, we are unable to handle nested compilation units
+                properly (FIXME).  */
+             if (current_subfile == NULL)
+               read_file_scope (&di, thisdie, nextdie, objfile);
+             else
+               nextdie = thisdie + di.die_length;
              break;
            case TAG_global_subroutine:
            case TAG_subroutine:
@@ -2618,6 +2623,9 @@ add_partial_symbol (dip, objfile)
     case TAG_structure_type:
     case TAG_union_type:
     case TAG_enumeration_type:
+      /* Do not add opaque aggregate definitions to the psymtab.  */
+      if (!dip -> has_at_byte_size)
+       break;
       ADD_PSYMBOL_TO_LIST (dip -> at_name, strlen (dip -> at_name),
                           STRUCT_NAMESPACE, LOC_TYPEDEF,
                           objfile -> static_psymbols,
This page took 0.030343 seconds and 4 git commands to generate.