summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Gilmore <gnu@cygnus>1991-10-04 07:40:21 +0000
committerJohn Gilmore <gnu@cygnus>1991-10-04 07:40:21 +0000
commit7cefc05e6a4830f103f2a6d8cce0010c54c4ca04 (patch)
tree5b0c5facafe16ed1403acb58d0893a30dd8b27d7
parente32becdf04da594f0ed8e976a149cb8f89a45e00 (diff)
downloadppe42-binutils-7cefc05e6a4830f103f2a6d8cce0010c54c4ca04.tar.gz
ppe42-binutils-7cefc05e6a4830f103f2a6d8cce0010c54c4ca04.zip
* coffread.c, dbxread.c, symfile.c, symmisc.c, symtab.h: Remove
vestiges of typevectors, which were for symsegs and are no longer used. (From a question by Eliot Dresselhaus <dresselh@RFT30.nas.nasa.gov>).
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/dbxread.c23
2 files changed, 16 insertions, 14 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 6d0711d5fb..e60adfd064 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,10 @@
+Fri Oct 4 00:35:56 1991 John Gilmore (gnu at cygnus.com)
+
+ * coffread.c, dbxread.c, symfile.c, symmisc.c, symtab.h: Remove
+ vestiges of typevectors, which were for symsegs and are no longer
+ used. (From a question by Eliot Dresselhaus
+ <dresselh@RFT30.nas.nasa.gov>).
+
Thu Oct 3 09:33:26 1991 John Gilmore (gnu at cygnus.com)
* dbxread.c, coffread.c: static-ize functions that were
diff --git a/gdb/dbxread.c b/gdb/dbxread.c
index b41a1ca21c..42ca221c90 100644
--- a/gdb/dbxread.c
+++ b/gdb/dbxread.c
@@ -235,7 +235,7 @@ static unsigned int symnum;
translated through the type_translations hash table to get
the index into the type vector.) */
-static struct typevector *type_vector;
+static struct type **type_vector;
/* Number of elements allocated for type_vector currently. */
@@ -629,14 +629,13 @@ dbx_lookup_type (typenums)
while (index >= type_vector_length)
{
type_vector_length *= 2;
- type_vector = (struct typevector *)
+ type_vector = (struct type **)
xrealloc (type_vector,
- (sizeof (struct typevector)
- + type_vector_length * sizeof (struct type *)));
- bzero (&type_vector->type[type_vector_length / 2],
+ (type_vector_length * sizeof (struct type *)));
+ bzero (&type_vector[type_vector_length / 2],
type_vector_length * sizeof (struct type *) / 2);
}
- return &type_vector->type[index];
+ return &type_vector[index];
}
else
{
@@ -1026,10 +1025,9 @@ start_symtab (name, dirname, start_addr)
new_object_header_files ();
type_vector_length = 160;
- type_vector = (struct typevector *)
- xmalloc (sizeof (struct typevector)
- + type_vector_length * sizeof (struct type *));
- bzero (type_vector->type, type_vector_length * sizeof (struct type *));
+ type_vector = (struct type **)
+ xmalloc (type_vector_length * sizeof (struct type *));
+ bzero (type_vector, type_vector_length * sizeof (struct type *));
/* Initialize the list of sub source files with one entry
for this file (the top-level source file). */
@@ -1156,15 +1154,11 @@ end_symtab (end_addr)
symtab->linetable = (struct linetable *)
xrealloc (lv, (sizeof (struct linetable)
+ lv->nitems * sizeof (struct linetable_entry)));
- type_vector->length = type_vector_length;
- symtab->typevector = type_vector;
symtab->dirname = subfile->dirname;
symtab->free_code = free_linetable;
symtab->free_ptr = 0;
- if (subfile->next == 0)
- symtab->free_ptr = (char *) type_vector;
/* There should never already be a symtab for this name, since
any prev dups have been removed when the psymtab was read in.
@@ -1179,6 +1173,7 @@ end_symtab (end_addr)
free (subfile);
}
+ free ((char *) type_vector);
type_vector = 0;
type_vector_length = -1;
line_vector = 0;
OpenPOWER on IntegriCloud