aboutsummaryrefslogtreecommitdiff
path: root/gdb/objfiles.h
diff options
context:
space:
mode:
authorElena Zannoni <ezannoni@kwikemart.cygnus.com>2004-02-07 16:57:55 +0000
committerElena Zannoni <ezannoni@kwikemart.cygnus.com>2004-02-07 16:57:55 +0000
commitb99607ea3cc204c613ef8acf0fce8bdffb7e89e7 (patch)
tree2742cbb70d2f812e252bc1db36275b0c12ca2129 /gdb/objfiles.h
parent2a8854a78354414c75a91fbd662ee32f743dd510 (diff)
downloadgdb-b99607ea3cc204c613ef8acf0fce8bdffb7e89e7.zip
gdb-b99607ea3cc204c613ef8acf0fce8bdffb7e89e7.tar.gz
gdb-b99607ea3cc204c613ef8acf0fce8bdffb7e89e7.tar.bz2
2004-02-07 Elena Zannoni <ezannoni@redhat.com>
* objfiles.h (struct objfile): Add objfile_obstack field. Remove type_obstack field. * dwarf2read.c (dwarf2_add_field,dwarf2_add_member_fn, read_structure_scope read_enumeration, new_symbol): Replace type_obstack with objfile_obstack. * dwarfread.c (struct_type, enum_type): Ditto. * gdbtypes.c (alloc_type, alloc_type_instance, init_type) (lookup_fundamental_type): Ditto. * gdbtypes.h (TYPE_ALLOC): Ditto. * hpread.c (hpread_read_enum_type, hpread_read_function_type) (hpread_read_doc_function_type, hpread_read_struct_type) (fix_static_member_physnames, hpread_read_array_type) (hpread_read_subrange_type, hpread_type_lookup): Ditto. * jv-lang.c (java_lookup_class, type_from_class, type_from_class) (java_link_class_type): Ditto. * mdebugread.c (parse_type): Ditto. * objfiles.c (allocate_objfile, free_objfile): Ditto. * solib-sunos.c (solib_add_common_symbols): Ditto. * stabsread.c (define_symbol, read_type, read_member_functions, read_cpp_abbrev, read_one_struct_field): Ditto. * symfile.c (reread_symbols): Ditto. * symmisc.c (print_objfile_statistics): Ditto.
Diffstat (limited to 'gdb/objfiles.h')
-rw-r--r--gdb/objfiles.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/gdb/objfiles.h b/gdb/objfiles.h
index aeb5892..62f239c 100644
--- a/gdb/objfiles.h
+++ b/gdb/objfiles.h
@@ -1,7 +1,7 @@
/* Definitions for symbol file management in GDB.
Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001, 2002, 2003 Free Software Foundation, Inc.
+ 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
This file is part of GDB.
@@ -281,12 +281,22 @@ struct objfile
long mtime;
+ /* Obstack to hold objects that should be freed when we load a new symbol
+ table from this object file. */
+
+ /* Note ezannoni 2004-02-05: this obstack will become the only
+ obstack per objfile instead of having 3 separate ones with the
+ same lifetime. I am in the process of gradually migrating the
+ old obstacks to this one, so that it can be used more
+ freely. */
+
+ struct obstack objfile_obstack;
+
/* Obstacks to hold objects that should be freed when we load a new symbol
table from this object file. */
struct obstack psymbol_obstack; /* Partial symbols */
struct obstack symbol_obstack; /* Full symbols */
- struct obstack type_obstack; /* Types */
/* A byte cache where we can stash arbitrary "chunks" of bytes that
will not change. */
@@ -509,7 +519,7 @@ extern struct objfile *symfile_objfile;
extern struct objfile *rt_common_objfile;
-/* When we need to allocate a new type, we need to know which type_obstack
+/* When we need to allocate a new type, we need to know which objfile_obstack
to allocate the type on, since there is one for each objfile. The places
where types are allocated are deeply buried in function call hierarchies
which know nothing about objfiles, so rather than trying to pass a