* 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.
+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.
+
2004-02-07 Andrew Cagney <cagney@redhat.com>
* tui/tui-data.h (tui_win_element): Rename TuiWinElement.
if (attr && DW_STRING (attr))
fieldname = DW_STRING (attr);
fp->name = obsavestring (fieldname, strlen (fieldname),
- &objfile->type_obstack);
+ &objfile->objfile_obstack);
/* Change accessibility for artificial fields (e.g. virtual table
pointer or virtual base class pointer) to private. */
physname = dwarf2_linkage_name (die, cu);
SET_FIELD_PHYSNAME (*fp, obsavestring (physname, strlen (physname),
- &objfile->type_obstack));
+ &objfile->objfile_obstack));
FIELD_TYPE (*fp) = die_type (die, cu);
FIELD_NAME (*fp) = obsavestring (fieldname, strlen (fieldname),
- &objfile->type_obstack);
+ &objfile->objfile_obstack);
}
else if (die->tag == DW_TAG_inheritance)
{
/* Fill in the member function field info. */
fnp = &new_fnfield->fnfield;
fnp->physname = obsavestring (physname, strlen (physname),
- &objfile->type_obstack);
+ &objfile->objfile_obstack);
fnp->type = alloc_type (objfile);
if (die->type && TYPE_CODE (die->type) == TYPE_CODE_FUNC)
{
TYPE_TAG_NAME to be a const char *, I ran into a cascade
of changes which would have forced decode_line_1 to take
a const char **. */
- char *new_prefix = obconcat (&objfile->type_obstack,
+ char *new_prefix = obconcat (&objfile->objfile_obstack,
processing_current_prefix,
processing_current_prefix[0] == '\0'
? "" : "::",
else
{
TYPE_TAG_NAME (type) = obsavestring (name, strlen (name),
- &objfile->type_obstack);
+ &objfile->objfile_obstack);
need_to_update_name = (cu->language == language_cplus);
}
}
TYPE_TAG_NAME (type)
= obsavestring (actual_class_name,
strlen (actual_class_name),
- &objfile->type_obstack);
+ &objfile->objfile_obstack);
}
xfree (actual_class_name);
need_to_update_name = 0;
if (processing_has_namespace_info)
{
- TYPE_TAG_NAME (type) = obconcat (&objfile->type_obstack,
+ TYPE_TAG_NAME (type) = obconcat (&objfile->objfile_obstack,
processing_current_prefix,
processing_current_prefix[0] == '\0'
? "" : "::",
else
{
TYPE_TAG_NAME (type) = obsavestring (name, strlen (name),
- &objfile->type_obstack);
+ &objfile->objfile_obstack);
}
}
TYPE_NAME (SYMBOL_TYPE (sym)) =
obsavestring (SYMBOL_NATURAL_NAME (sym),
strlen (SYMBOL_NATURAL_NAME (sym)),
- &objfile->type_obstack);
+ &objfile->objfile_obstack);
add_symbol_to_list (typedef_sym, list_to_add);
}
}
/* DWARF debugging format support for GDB.
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+ 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
Written by Fred Fish at Cygnus Support. Portions based on dbxread.c,
mipsread.c, coffread.c, and dwarfread.c from a Data General SVR4 gdb port.
&& *dip->at_name != '~'
&& *dip->at_name != '.')
{
- TYPE_TAG_NAME (type) = obconcat (&objfile->type_obstack,
+ TYPE_TAG_NAME (type) = obconcat (&objfile->objfile_obstack,
"", "", dip->at_name);
}
/* Use whatever size is known. Zero is a valid size. We might however
/* Save the data. */
list->field.name =
obsavestring (mbr.at_name, strlen (mbr.at_name),
- &objfile->type_obstack);
+ &objfile->objfile_obstack);
FIELD_TYPE (list->field) = decode_die_type (&mbr);
FIELD_BITPOS (list->field) = 8 * locval (&mbr);
FIELD_STATIC_KIND (list->field) = 0;
&& *dip->at_name != '~'
&& *dip->at_name != '.')
{
- TYPE_TAG_NAME (type) = obconcat (&objfile->type_obstack,
+ TYPE_TAG_NAME (type) = obconcat (&objfile->objfile_obstack,
"", "", dip->at_name);
}
if (dip->at_byte_size != 0)
objfile);
scan += TARGET_FT_LONG_SIZE (objfile);
list->field.name = obsavestring (scan, strlen (scan),
- &objfile->type_obstack);
+ &objfile->objfile_obstack);
scan += strlen (scan) + 1;
nfields++;
/* Handcraft a new symbol for this enum member. */
/* Support routines for manipulating internal types for GDB.
- Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003
- Free Software Foundation, Inc.
+ Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003,
+ 2004 Free Software Foundation, Inc.
Contributed by Cygnus Support, using pieces from other GDB modules.
This file is part of GDB.
/* Alloc a new type structure and fill it with some defaults. If
OBJFILE is non-NULL, then allocate the space for the type structure
- in that objfile's type_obstack. Otherwise allocate the new type structure
+ in that objfile's objfile_obstack. Otherwise allocate the new type structure
by xmalloc () (for permanent types). */
struct type *
}
else
{
- type = obstack_alloc (&objfile->type_obstack,
+ type = obstack_alloc (&objfile->objfile_obstack,
sizeof (struct type));
memset (type, 0, sizeof (struct type));
- TYPE_MAIN_TYPE (type) = obstack_alloc (&objfile->type_obstack,
+ TYPE_MAIN_TYPE (type) = obstack_alloc (&objfile->objfile_obstack,
sizeof (struct main_type));
OBJSTAT (objfile, n_types++);
}
}
else
{
- type = obstack_alloc (&TYPE_OBJFILE (oldtype)->type_obstack,
+ type = obstack_alloc (&TYPE_OBJFILE (oldtype)->objfile_obstack,
sizeof (struct type));
memset (type, 0, sizeof (struct type));
}
/* Helper function to initialize the standard scalar types.
If NAME is non-NULL and OBJFILE is non-NULL, then we make a copy
- of the string pointed to by name in the type_obstack for that objfile,
+ of the string pointed to by name in the objfile_obstack for that objfile,
and initialize the type name to that copy. There are places (mipsread.c
in particular, where init_type is called with a NULL value for NAME). */
if ((name != NULL) && (objfile != NULL))
{
TYPE_NAME (type) =
- obsavestring (name, strlen (name), &objfile->type_obstack);
+ obsavestring (name, strlen (name), &objfile->objfile_obstack);
}
else
{
{
nbytes = FT_NUM_MEMBERS * sizeof (struct type *);
objfile->fundamental_types = (struct type **)
- obstack_alloc (&objfile->type_obstack, nbytes);
+ obstack_alloc (&objfile->objfile_obstack, nbytes);
memset ((char *) objfile->fundamental_types, 0, nbytes);
OBJSTAT (objfile, n_types += FT_NUM_MEMBERS);
}
/* Internal type definitions for 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.
Contributed by Cygnus Support, using pieces from other GDB modules.
char *tag_name;
/* Every type is now associated with a particular objfile, and the
- type is allocated on the type_obstack for that objfile. One problem
+ type is allocated on the objfile_obstack for that objfile. One problem
however, is that there are times when gdb allocates new types while
it is not in the process of reading symbols from a particular objfile.
Fortunately, these happen when the type being created is a derived
/* Allocate space for storing data associated with a particular type.
We ensure that the space is allocated using the same mechanism that
was used to allocate the space for the type structure itself. I.E.
- if the type is on an objfile's type_obstack, then the space for data
- associated with that type will also be allocated on the type_obstack.
+ if the type is on an objfile's objfile_obstack, then the space for data
+ associated with that type will also be allocated on the objfile_obstack.
If the type is not associated with any particular objfile (such as
builtin types), then the data space will be allocated with xmalloc,
the same as for the type structure. */
#define TYPE_ALLOC(t,size) \
(TYPE_OBJFILE (t) != NULL \
- ? obstack_alloc (&TYPE_OBJFILE (t) -> type_obstack, size) \
+ ? obstack_alloc (&TYPE_OBJFILE (t) -> objfile_obstack, size) \
: xmalloc (size))
extern struct type *alloc_type (struct objfile *);
TYPE_FLAGS (type) &= ~TYPE_FLAG_STUB;
TYPE_NFIELDS (type) = nsyms;
TYPE_FIELDS (type) = (struct field *)
- obstack_alloc (&objfile->type_obstack, sizeof (struct field) * nsyms);
+ obstack_alloc (&objfile->objfile_obstack, sizeof (struct field) * nsyms);
/* Find the symbols for the members and put them into the type.
The symbols can be found in the symlist that we put them on
/* Note how many parameters we found. */
TYPE_NFIELDS (type) = nsyms;
TYPE_FIELDS (type) = (struct field *)
- obstack_alloc (&objfile->type_obstack,
+ obstack_alloc (&objfile->objfile_obstack,
sizeof (struct field) * nsyms);
/* Find the symbols for the parameters and
/* Note how many parameters we found. */
TYPE_NFIELDS (type) = nsyms;
TYPE_FIELDS (type) = (struct field *)
- obstack_alloc (&objfile->type_obstack,
+ obstack_alloc (&objfile->objfile_obstack,
sizeof (struct field) * nsyms);
/* Find the symbols for the parameters and
if (n_templ_args > 0)
TYPE_TEMPLATE_ARGS (type) = (struct template_arg *)
- obstack_alloc (&objfile->type_obstack, sizeof (struct template_arg) * n_templ_args);
+ obstack_alloc (&objfile->objfile_obstack, sizeof (struct template_arg) * n_templ_args);
for (n = n_templ_args; t_list; t_list = t_list->next)
{
n -= 1;
TYPE_NINSTANTIATIONS (type) = ninstantiations;
if (ninstantiations > 0)
TYPE_INSTANTIATIONS (type) = (struct type **)
- obstack_alloc (&objfile->type_obstack, sizeof (struct type *) * ninstantiations);
+ obstack_alloc (&objfile->objfile_obstack, sizeof (struct type *) * ninstantiations);
for (n = ninstantiations; i_list; i_list = i_list->next)
{
n -= 1;
TYPE_NFIELDS (type) = nfields;
TYPE_N_BASECLASSES (type) = n_base_classes;
TYPE_FIELDS (type) = (struct field *)
- obstack_alloc (&objfile->type_obstack, sizeof (struct field) * nfields);
+ obstack_alloc (&objfile->objfile_obstack, sizeof (struct field) * nfields);
/* Copy the saved-up fields into the field vector. */
for (n = nfields, tmp_list = list; tmp_list; tmp_list = tmp_list->next)
{
TYPE_NFN_FIELDS (type) = n_fn_fields;
TYPE_NFN_FIELDS_TOTAL (type) = n_fn_fields_total;
TYPE_FN_FIELDLISTS (type) = (struct fn_fieldlist *)
- obstack_alloc (&objfile->type_obstack, sizeof (struct fn_fieldlist) * n_fn_fields);
+ obstack_alloc (&objfile->objfile_obstack, sizeof (struct fn_fieldlist) * n_fn_fields);
for (n = n_fn_fields; fn_list; fn_list = fn_list->next)
{
n -= 1;
return; /* physnames are already set */
SET_FIELD_PHYSNAME (TYPE_FIELDS (type)[i],
- obstack_alloc (&objfile->type_obstack,
+ obstack_alloc (&objfile->objfile_obstack,
strlen (class_name) + strlen (TYPE_FIELD_NAME (type, i)) + 3));
strcpy (TYPE_FIELD_STATIC_PHYSNAME (type, i), class_name);
strcat (TYPE_FIELD_STATIC_PHYSNAME (type, i), "::");
*/
TYPE_NFIELDS (type) = 1;
TYPE_FIELDS (type) = (struct field *)
- obstack_alloc (&objfile->type_obstack, sizeof (struct field));
+ obstack_alloc (&objfile->objfile_obstack, sizeof (struct field));
TYPE_FIELD_TYPE (type, 0) = hpread_type_lookup (dn_bufp->darray.indextype,
objfile);
return type;
TYPE_LENGTH (type) = dn_bufp->dsubr.bitlength / 8;
TYPE_NFIELDS (type) = 2;
TYPE_FIELDS (type)
- = (struct field *) obstack_alloc (&objfile->type_obstack,
+ = (struct field *) obstack_alloc (&objfile->objfile_obstack,
2 * sizeof (struct field));
if (dn_bufp->dsubr.dyn_low)
/* Build the correct name. */
TYPE_NAME (structtype)
- = (char *) obstack_alloc (&objfile->type_obstack,
+ = (char *) obstack_alloc (&objfile->objfile_obstack,
strlen (prefix) + strlen (suffix) + 1);
TYPE_NAME (structtype) = strcpy (TYPE_NAME (structtype), prefix);
TYPE_NAME (structtype) = strcat (TYPE_NAME (structtype), suffix);
type = alloc_type (objfile);
TYPE_CODE (type) = TYPE_CODE_STRUCT;
INIT_CPLUS_SPECIFIC (type);
- TYPE_TAG_NAME (type) = obsavestring (name, strlen (name), &objfile->type_obstack);
+ TYPE_TAG_NAME (type) = obsavestring (name, strlen (name), &objfile->objfile_obstack);
TYPE_FLAGS (type) |= TYPE_FLAG_STUB;
TYPE ? = addr;
return type;
/* if clasloader non-null, prepend loader address. FIXME */
temp = clas;
utf8_name = value_struct_elt (&temp, NULL, "name", NULL, "structure");
- name = get_java_utf8_name (&objfile->type_obstack, utf8_name);
+ name = get_java_utf8_name (&objfile->objfile_obstack, utf8_name);
for (nptr = name; *nptr != 0; nptr++)
{
if (*nptr == '/')
char *signature = name;
int namelen = java_demangled_signature_length (signature);
if (namelen > strlen (name))
- name = obstack_alloc (&objfile->type_obstack, namelen + 1);
+ name = obstack_alloc (&objfile->objfile_obstack, namelen + 1);
java_demangled_signature_copy (name, signature);
name[namelen] = '\0';
is_array = 1;
temp = field;
temp = value_struct_elt (&temp, NULL, "name", NULL, "structure");
TYPE_FIELD_NAME (type, i) =
- get_java_utf8_name (&objfile->type_obstack, temp);
+ get_java_utf8_name (&objfile->objfile_obstack, temp);
temp = field;
accflags = value_as_long (value_struct_elt (&temp, NULL, "accflags",
NULL, "structure"));
/* Get method name. */
temp = method;
temp = value_struct_elt (&temp, NULL, "name", NULL, "structure");
- mname = get_java_utf8_name (&objfile->type_obstack, temp);
+ mname = get_java_utf8_name (&objfile->objfile_obstack, temp);
if (strcmp (mname, "<init>") == 0)
mname = unqualified_name;
{ /* Found an existing method with the same name. */
int l;
if (mname != unqualified_name)
- obstack_free (&objfile->type_obstack, mname);
+ obstack_free (&objfile->objfile_obstack, mname);
mname = fn_fieldlists[j].name;
fn_fieldlists[j].length++;
k = i - k; /* Index of new slot. */
else if (TYPE_TAG_NAME (tp) == NULL
|| strcmp (TYPE_TAG_NAME (tp), name) != 0)
TYPE_TAG_NAME (tp) = obsavestring (name, strlen (name),
- ¤t_objfile->type_obstack);
+ ¤t_objfile->objfile_obstack);
}
}
if (TYPE_NAME (tp) == NULL
|| strcmp (TYPE_NAME (tp), name) != 0)
TYPE_NAME (tp) = obsavestring (name, strlen (name),
- ¤t_objfile->type_obstack);
+ ¤t_objfile->objfile_obstack);
}
}
if (t->bt == btTypedef)
TYPE_FIELDS (tp) = ((struct field *)
TYPE_ALLOC (tp, 2 * sizeof (struct field)));
TYPE_FIELD_NAME (tp, 0) = obsavestring ("Low", strlen ("Low"),
- ¤t_objfile->type_obstack);
+ ¤t_objfile->objfile_obstack);
TYPE_FIELD_BITPOS (tp, 0) = AUX_GET_DNLOW (bigend, ax);
ax++;
TYPE_FIELD_NAME (tp, 1) = obsavestring ("High", strlen ("High"),
- ¤t_objfile->type_obstack);
+ ¤t_objfile->objfile_obstack);
TYPE_FIELD_BITPOS (tp, 1) = AUX_GET_DNHIGH (bigend, ax);
ax++;
}
/* GDB routines for manipulating objfiles.
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.
Contributed by Cygnus Support, using pieces from other GDB modules.
xfree);
obstack_specify_allocation (&objfile->symbol_obstack, 0, 0, xmalloc,
xfree);
- obstack_specify_allocation (&objfile->type_obstack, 0, 0, xmalloc,
+ obstack_specify_allocation (&objfile->objfile_obstack, 0, 0, xmalloc,
xfree);
terminate_minimal_symbol_table (objfile);
htab_delete (objfile->demangled_names_hash);
obstack_free (&objfile->psymbol_obstack, 0);
obstack_free (&objfile->symbol_obstack, 0);
- obstack_free (&objfile->type_obstack, 0);
+ obstack_free (&objfile->objfile_obstack, 0);
xmfree (objfile->md, objfile);
objfile = NULL;
}
/* 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.
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. */
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
/* Handle SunOS shared libraries for GDB, the GNU Debugger.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000,
- 2001
+ 2001, 2004
Free Software Foundation, Inc.
This file is part of GDB.
xfree);
obstack_specify_allocation (&objfile->symbol_obstack, 0, 0, xmalloc,
xfree);
- obstack_specify_allocation (&objfile->type_obstack, 0, 0, xmalloc,
+ obstack_specify_allocation (&objfile->objfile_obstack, 0, 0, xmalloc,
xfree);
objfile->name = mstrsave (objfile->md, "rt_common");
SYMBOL_DOMAIN (sym) = STRUCT_DOMAIN;
if (TYPE_TAG_NAME (SYMBOL_TYPE (sym)) == 0)
TYPE_TAG_NAME (SYMBOL_TYPE (sym))
- = obconcat (&objfile->type_obstack, "", "", DEPRECATED_SYMBOL_NAME (sym));
+ = obconcat (&objfile->objfile_obstack, "", "", DEPRECATED_SYMBOL_NAME (sym));
add_symbol_to_list (sym, &file_symbols);
if (synonym)
SYMBOL_DOMAIN (typedef_sym) = VAR_DOMAIN;
if (TYPE_NAME (SYMBOL_TYPE (sym)) == 0)
TYPE_NAME (SYMBOL_TYPE (sym))
- = obconcat (&objfile->type_obstack, "", "", DEPRECATED_SYMBOL_NAME (sym));
+ = obconcat (&objfile->objfile_obstack, "", "", DEPRECATED_SYMBOL_NAME (sym));
add_symbol_to_list (typedef_sym, &file_symbols);
}
break;
return error_type (pp, objfile);
}
to = type_name =
- (char *) obstack_alloc (&objfile->type_obstack, p - *pp + 1);
+ (char *) obstack_alloc (&objfile->objfile_obstack, p - *pp + 1);
/* Copy the name. */
from = *pp + 1;
&& (TYPE_CODE (SYMBOL_TYPE (sym)) == code)
&& strcmp (DEPRECATED_SYMBOL_NAME (sym), type_name) == 0)
{
- obstack_free (&objfile->type_obstack, type_name);
+ obstack_free (&objfile->objfile_obstack, type_name);
type = SYMBOL_TYPE (sym);
if (typenums[0] != -1)
*dbx_lookup_type (typenums) = type;
make_cleanup (xfree, destr_fnlist);
memset (destr_fnlist, 0, sizeof (struct next_fnfieldlist));
destr_fnlist->fn_fieldlist.name
- = obconcat (&objfile->type_obstack, "", "~",
+ = obconcat (&objfile->objfile_obstack, "", "~",
new_fnlist->fn_fieldlist.name);
destr_fnlist->fn_fieldlist.fn_fields = (struct fn_field *)
- obstack_alloc (&objfile->type_obstack,
+ obstack_alloc (&objfile->objfile_obstack,
sizeof (struct fn_field) * has_destructor);
memset (destr_fnlist->fn_fieldlist.fn_fields, 0,
sizeof (struct fn_field) * has_destructor);
if (ret)
new_fnlist->fn_fieldlist.name
= obsavestring (dem_opname, strlen (dem_opname),
- &objfile->type_obstack);
+ &objfile->objfile_obstack);
}
new_fnlist->fn_fieldlist.fn_fields = (struct fn_field *)
- obstack_alloc (&objfile->type_obstack,
+ obstack_alloc (&objfile->objfile_obstack,
sizeof (struct fn_field) * length);
memset (new_fnlist->fn_fieldlist.fn_fields, 0,
sizeof (struct fn_field) * length);
name = "";
}
fip->list->field.name =
- obconcat (&objfile->type_obstack, vptr_name, name, "");
+ obconcat (&objfile->objfile_obstack, vptr_name, name, "");
break;
case 'b': /* $vb -- a virtual bsomethingorother */
name = "FOO";
}
fip->list->field.name =
- obconcat (&objfile->type_obstack, vb_name, name, "");
+ obconcat (&objfile->objfile_obstack, vb_name, name, "");
break;
default:
invalid_cpp_abbrev_complaint (*pp);
fip->list->field.name =
- obconcat (&objfile->type_obstack,
+ obconcat (&objfile->objfile_obstack,
"INVALID_CPLUSPLUS_ABBREV", "", "");
break;
}
struct type *type, struct objfile *objfile)
{
fip->list->field.name =
- obsavestring (*pp, p - *pp, &objfile->type_obstack);
+ obsavestring (*pp, p - *pp, &objfile->objfile_obstack);
*pp = p + 1;
/* This means we have a visibility for a field coming. */
}
obstack_free (&objfile->psymbol_obstack, 0);
obstack_free (&objfile->symbol_obstack, 0);
- obstack_free (&objfile->type_obstack, 0);
+ obstack_free (&objfile->objfile_obstack, 0);
objfile->sections = NULL;
objfile->symtabs = NULL;
objfile->psymtabs = NULL;
xmalloc, xfree);
obstack_specify_allocation (&objfile->symbol_obstack, 0, 0,
xmalloc, xfree);
- obstack_specify_allocation (&objfile->type_obstack, 0, 0,
+ obstack_specify_allocation (&objfile->objfile_obstack, 0, 0,
xmalloc, xfree);
if (build_objfile_section_table (objfile))
{
/* Do various things to symbol tables (other than lookup), for GDB.
Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
- 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003 Free Software
+ 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2004 Free Software
Foundation, Inc.
This file is part of GDB.
printf_filtered (" Total memory used for symbol obstack: %d\n",
obstack_memory_used (&objfile->symbol_obstack));
printf_filtered (" Total memory used for type obstack: %d\n",
- obstack_memory_used (&objfile->type_obstack));
+ obstack_memory_used (&objfile->objfile_obstack));
}
immediate_quit--;
}