summaryrefslogtreecommitdiff
path: root/gdb/dwarf2read.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <dan@debian.org>2006-02-01 23:14:11 +0000
committerDaniel Jacobowitz <dan@debian.org>2006-02-01 23:14:11 +0000
commit33253e82af7b74189bdb497051f9978cc465d7b7 (patch)
treeeebf944d8a6fd74a256c00e9e34fa72d0c3fbaff /gdb/dwarf2read.c
parent5ba170399093a11a387b3dbe6a33cef5e31b65eb (diff)
downloadgdb-33253e82af7b74189bdb497051f9978cc465d7b7.tar.gz
gdb/
* Makefile.in (gdbtypes_h, gdbtypes.o, utils.o): Update. * defs.h (hashtab_obstack_allocate, dummy_obstack_deallocate): Add prototypes. * dwarf2read.c (read_subroutine_type): Use TYPE_ZALLOC. (hashtab_obstack_allocate, dummy_obstack_deallocate): Moved to... * utils.c (hashtab_obstack_allocate, dummy_obstack_deallocate): ...here. * gdbtypes.c: Include "hashtab.h". (build_gdbtypes): Remove extra prototype. (struct type_pair, type_pair_hash, type_pair_eq) (create_copied_types_hash, copy_type_recursive): New. * gdbtypes.h: Include "hashtab.h". (TYPE_ZALLOC): New. (create_copied_types_hash, copy_type_recursive): New prototypes. * objfiles.c (free_objfile): Call preserve_values. * symfile.c (reread_symbols): Likewise. (clear_symtab_users): Remove calls to clear_value_history and clear_internalvars. * value.c (clear_value_history, clear_internalvars): Removed. (preserve_one_value, preserve_values): New functions. * value.h (clear_value_history, clear_internalvars): Removed. (preserve_values): New prototype. * tracepoint.c (_initialize_tracepoint): Do not initialize convenience variables here. gdb/doc/ * gdb.texinfo (Files): Remove obsolete bits from the description of "symbol-file".
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r--gdb/dwarf2read.c28
1 files changed, 1 insertions, 27 deletions
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 943f30477f8..85152a34c88 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -1030,10 +1030,6 @@ static gdb_byte *skip_one_die (gdb_byte *info_ptr, struct abbrev_info *abbrev,
static void free_stack_comp_unit (void *);
-static void *hashtab_obstack_allocate (void *data, size_t size, size_t count);
-
-static void dummy_obstack_deallocate (void *object, void *data);
-
static hashval_t partial_die_hash (const void *item);
static int partial_die_eq (const void *item_lhs, const void *item_rhs);
@@ -4627,7 +4623,7 @@ read_subroutine_type (struct die_info *die, struct dwarf2_cu *cu)
/* Allocate storage for parameters and fill them in. */
TYPE_NFIELDS (ftype) = nparams;
TYPE_FIELDS (ftype) = (struct field *)
- TYPE_ALLOC (ftype, nparams * sizeof (struct field));
+ TYPE_ZALLOC (ftype, nparams * sizeof (struct field));
child_die = die->child;
while (child_die && child_die->tag)
@@ -9622,28 +9618,6 @@ dwarf2_clear_marks (struct dwarf2_per_cu_data *per_cu)
}
}
-/* Allocation function for the libiberty hash table which uses an
- obstack. */
-
-static void *
-hashtab_obstack_allocate (void *data, size_t size, size_t count)
-{
- unsigned int total = size * count;
- void *ptr = obstack_alloc ((struct obstack *) data, total);
- memset (ptr, 0, total);
- return ptr;
-}
-
-/* Trivial deallocation function for the libiberty splay tree and hash
- table - don't deallocate anything. Rely on later deletion of the
- obstack. */
-
-static void
-dummy_obstack_deallocate (void *object, void *data)
-{
- return;
-}
-
/* Trivial hash function for partial_die_info: the hash value of a DIE
is its offset in .debug_info for this objfile. */