* gdb.base/display.c (do_loops): Add float variable `f'.
[deliverable/binutils-gdb.git] / gdb / hp-psymtab-read.c
index db68c1fc10fbe714608de34544944c51752a2c56..ad001d300d65b19c4a5f300a1889d8e389d5dd49 100644 (file)
@@ -1,5 +1,5 @@
 /* Read hp debug symbols and convert to internal format, for GDB.
-   Copyright 1993, 1996, 1998, 1999 Free Software Foundation, Inc.
+   Copyright 1993, 1996, 1998, 1999, 2000 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -70,7 +70,7 @@ static struct partial_symtab *hpread_end_psymtab
 #include <stdlib.h>
 #include <string.h>
 
-/* check for the existance of a file, given its full pathname */
+/* check for the existence of a file, given its full pathname */
 int
 file_exists (char *filename)
 {
@@ -103,7 +103,7 @@ static char main_string[] = "main";
 /* Call PXDB to process our file.
 
    Approach copied from DDE's "dbgk_run_pxdb".  Note: we
-   don't check for BSD location of pxdb, nor for existance
+   don't check for BSD location of pxdb, nor for existence
    of pxdb itself, etc.
 
    NOTE: uses system function and string functions directly.
@@ -118,7 +118,7 @@ hpread_call_pxdb (char *file_name)
 
   if (file_exists (PXDB_SVR4))
     {
-      p = malloc (strlen (PXDB_SVR4) + strlen (file_name) + 2);
+      p = xmalloc (strlen (PXDB_SVR4) + strlen (file_name) + 2);
       strcpy (p, PXDB_SVR4);
       strcat (p, " ");
       strcat (p, file_name);
@@ -381,7 +381,7 @@ clear_pst_syms (void)
 {
   pst_syms_count = 0;
   pst_syms_size = 0;
-  free (pst_syms_array);
+  xfree (pst_syms_array);
   pst_syms_array = 0;
 }
 
@@ -488,20 +488,23 @@ find_next_module_isym (int index, quick_module_entry *qMD, int curr_md,
    pointed to by CURR_PD_P, and between code addresses START_ADR and END_ADR.
    Other parameters are explained in comments below. */
 
-/* This used to be inline in hpread_quick_traverse, but now that we do essentially the
-   same thing for two different cases (modules and module-less files), it's better
-   organized in a separate routine, although it does take lots of arguments. pai/1997-10-08 */
+/* This used to be inline in hpread_quick_traverse, but now that we do
+   essentially the same thing for two different cases (modules and
+   module-less files), it's better organized in a separate routine,
+   although it does take lots of arguments.  pai/1997-10-08
+   
+   CURR_PD_P is the pointer to the current proc index. QPD is the
+   procedure quick lookup table.  MAX_PROCS is the number of entries
+   in the proc. table.  START_ADR is the beginning of the code range
+   for the current psymtab.  end_adr is the end of the code range for
+   the current psymtab.  PST is the current psymtab.  VT_bits is
+   a pointer to the strings table of SOM debug space.  OBJFILE is
+   the current object file. */
 
 static int
-scan_procs (curr_pd_p, qPD, max_procs, start_adr, end_adr, pst, vt_bits, objfile)
-     int *curr_pd_p;           /* pointer to current proc index */
-     quick_procedure_entry *qPD;       /* the procedure quick lookup table */
-     int max_procs;            /* number of entries in proc. table */
-     CORE_ADDR start_adr;      /* beginning of code range for current psymtab */
-     CORE_ADDR end_adr;                /* end of code range for current psymtab */
-     struct partial_symtab *pst;       /* current psymtab */
-     char *vt_bits;            /* strings table of SOM debug space */
-     struct objfile *objfile;  /* current object file */
+scan_procs (int *curr_pd_p, quick_procedure_entry *qPD, int max_procs,
+           CORE_ADDR start_adr, CORE_ADDR end_adr, struct partial_symtab *pst,
+           char *vt_bits, struct objfile *objfile)
 {
   union dnttentry *dn_bufp;
   int symbol_count = 0;                /* Total number of symbols in this psymtab */
@@ -623,11 +626,8 @@ scan_procs (curr_pd_p, qPD, max_procs, start_adr, end_adr, pst, vt_bits, objfile
    entry for it, so in such cases we create a psymtab for the file.  */
 
 int
-hpread_quick_traverse (objfile, gntt_bits, vt_bits, pxdb_header_p)
-     struct objfile *objfile;  /* The object file descriptor */
-     char *gntt_bits;          /* GNTT entries, loaded in from the file */
-     char *vt_bits;            /* VT (string) entries ditto. */
-     PXDB_header_ptr pxdb_header_p;    /* Pointer to pxdb header ditto */
+hpread_quick_traverse (struct objfile *objfile, char *gntt_bits,
+                      char *vt_bits, PXDB_header_ptr pxdb_header_p)
 {
   struct partial_symtab *pst;
 
@@ -946,7 +946,7 @@ hpread_quick_traverse (objfile, gntt_bits, vt_bits, pxdb_header_p)
                                          static_syms);
 
              /* Set up to only enter each class referenced in this module once.  */
-             class_entered = malloc (B_BYTES (pxdb_header_p->cd_entries));
+             class_entered = xmalloc (B_BYTES (pxdb_header_p->cd_entries));
              B_CLRALL (class_entered, pxdb_header_p->cd_entries);
 
              /* Scan the procedure descriptors for procedures in the current
@@ -1025,7 +1025,7 @@ hpread_quick_traverse (objfile, gntt_bits, vt_bits, pxdb_header_p)
              /* Prepare for the next psymtab. */
              global_syms = objfile->global_psymbols.next;
              static_syms = objfile->static_psymbols.next;
-             free (class_entered);
+             xfree (class_entered);
 
              curr_fd++;
            }                   /* Psymtab for file */
@@ -1174,7 +1174,7 @@ hpread_quick_traverse (objfile, gntt_bits, vt_bits, pxdb_header_p)
                                          static_syms);
 
              /* Set up to only enter each class referenced in this module once.  */
-             class_entered = malloc (B_BYTES (pxdb_header_p->cd_entries));
+             class_entered = xmalloc (B_BYTES (pxdb_header_p->cd_entries));
              B_CLRALL (class_entered, pxdb_header_p->cd_entries);
 
              /* Scan the procedure descriptors for procedures in the current
@@ -1254,7 +1254,7 @@ hpread_quick_traverse (objfile, gntt_bits, vt_bits, pxdb_header_p)
              /* Prepare for the next psymtab. */
              global_syms = objfile->global_psymbols.next;
              static_syms = objfile->static_psymbols.next;
-             free (class_entered);
+             xfree (class_entered);
 
              curr_md++;
              curr_fd++;
@@ -2104,8 +2104,8 @@ hpread_get_slt (int index, struct objfile *objfile)
 
 /* Get the low address associated with some symbol (typically the start
    of a particular source file or module).  Since that information is not
-   stored as part of the DNTT_TYPE_MODULE or DNTT_TYPE_SRCFILE symbol we must infer it from
-   the existance of DNTT_TYPE_FUNCTION symbols.  */
+   stored as part of the DNTT_TYPE_MODULE or DNTT_TYPE_SRCFILE symbol we
+   must infer it from the existence of DNTT_TYPE_FUNCTION symbols.  */
 
 static unsigned long
 hpread_get_textlow (int global, int index, struct objfile *objfile,
This page took 0.027973 seconds and 4 git commands to generate.