forked from Imagelibrary/binutils-gdb
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.
This commit is contained in:
@@ -186,7 +186,7 @@ java_lookup_class (char *name)
|
||||
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;
|
||||
@@ -289,7 +289,7 @@ type_from_class (struct value *clas)
|
||||
/* 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 == '/')
|
||||
@@ -309,7 +309,7 @@ type_from_class (struct value *clas)
|
||||
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;
|
||||
@@ -442,7 +442,7 @@ java_link_class_type (struct type *type, struct value *clas)
|
||||
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"));
|
||||
@@ -513,7 +513,7 @@ java_link_class_type (struct type *type, struct value *clas)
|
||||
/* 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;
|
||||
|
||||
@@ -538,7 +538,7 @@ java_link_class_type (struct type *type, struct value *clas)
|
||||
{ /* 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. */
|
||||
|
||||
Reference in New Issue
Block a user