More comment fixes to make the code clearer.
[deliverable/binutils-gdb.git] / gdb / hpread.c
index 981b9e63b101f68f987da830bf0c20790ad2e843..8183558568940109cb31a0f77b82e67cdbbad73d 100644 (file)
@@ -136,6 +136,9 @@ extern struct complaint lbrac_mismatch_complaint;
 \f
 void hpread_symfile_init  PARAMS ((struct objfile *));
 
+static struct type *
+hpread_read_array_type PARAMS ((dnttpointer, union dnttentry *, struct objfile *));
+
 static struct type *hpread_alloc_type
   PARAMS ((dnttpointer, struct objfile *));
 
@@ -337,7 +340,7 @@ hpread_build_psymtabs (objfile, section_offsets, mainline)
   int dependencies_used, dependencies_allocated;
 
   /* Just in case the stabs reader left turds lying around.  */
-  pending_blocks = 0;
+  free_pending_blocks ();
   make_cleanup (really_free_pendings, 0);
 
   pst = (struct partial_symtab *) 0;
@@ -1092,7 +1095,10 @@ hpread_expand_symtab (objfile, sym_offset, sym_size, text_offset, text_size,
   dn_bufp = hpread_get_lntt (sym_index, objfile);
   if (!((dn_bufp->dblock.kind == (unsigned char) DNTT_TYPE_SRCFILE) ||
        (dn_bufp->dblock.kind == (unsigned char) DNTT_TYPE_MODULE)))
-    start_symtab ("globals", NULL, 0);
+    {
+      start_symtab ("globals", NULL, 0);
+      record_debugformat ("HP");
+    }
 
   max_symnum = sym_size / sizeof (struct dntt_type_block);
 
@@ -1324,7 +1330,6 @@ hpread_read_enum_type (hp_type, dn_bufp, objfile)
          struct symbol *xsym = syms->symbol[j];
          SYMBOL_TYPE (xsym) = type;
          TYPE_FIELD_NAME (type, n) = SYMBOL_NAME (xsym);
-         TYPE_FIELD_VALUE (type, n) = 0;
          TYPE_FIELD_BITPOS (type, n) = SYMBOL_VALUE (xsym);
          TYPE_FIELD_BITSIZE (type, n) = 0;
        }
@@ -1501,14 +1506,15 @@ hpread_read_struct_type (hp_type, dn_bufp, objfile)
       list = new;
 
       list->field.name = VT (objfile) + fieldp->dfield.name;
-      list->field.bitpos = fieldp->dfield.bitoffset;
+      FIELD_BITPOS (list->field) = fieldp->dfield.bitoffset;
       if (fieldp->dfield.bitlength % 8)
-       list->field.bitsize = fieldp->dfield.bitlength;
+       FIELD_BITSIZE (list->field) = fieldp->dfield.bitlength;
       else
-       list->field.bitsize = 0;
+       FIELD_BITSIZE (list->field) = 0;
       nfields++;
       field = fieldp->dfield.nextfield;
-      list->field.type = hpread_type_lookup (fieldp->dfield.type, objfile);
+      FIELD_TYPE (list->field) = hpread_type_lookup (fieldp->dfield.type,
+                                                    objfile);
     }
 
   TYPE_NFIELDS (type) = nfields;
@@ -1822,6 +1828,7 @@ hpread_process_one_debug_symbol (dn_bufp, name, section_offsets, objfile,
       if (!last_source_file)
        {
          start_symtab (name, NULL, valu);
+         record_debugformat ("HP");
          SL_INDEX (objfile) = dn_bufp->dsfile.address;
        }
       else
This page took 0.024871 seconds and 4 git commands to generate.