aboutsummaryrefslogtreecommitdiff
path: root/gdb/dstread.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2002-05-13 14:00:36 +0000
committerDaniel Jacobowitz <drow@false.org>2002-05-13 14:00:36 +0000
commit0004e5a2cf40bcf4485a7b552b5d19ed69d11eba (patch)
tree6db6963388477454ae59a82e908cdc05605350db /gdb/dstread.c
parent8395426148f8340771c51d37f9244867974ef42a (diff)
downloadgdb-0004e5a2cf40bcf4485a7b552b5d19ed69d11eba.zip
gdb-0004e5a2cf40bcf4485a7b552b5d19ed69d11eba.tar.gz
gdb-0004e5a2cf40bcf4485a7b552b5d19ed69d11eba.tar.bz2
2002-05-13 Daniel Jacobowitz <drow@mvista.com>
* ax-gdb.c (gen_sign_extend, gen_fetch, gen_usual_unary) (gen_cast, gen_scale, gen_add, gen_sub, gen_binop, gen_deref) (gen_address_of, gen_struct_ref, gen_repeat): Use type access macros. * c-typeprint.c (cp_type_print_method_args): Likewise. (c_type_print_args): Likewise. * d10v-tdep.c (d10v_push_arguments): Likewise. (d10v_extract_return_value): Likewise. * expprint.c (print_subexp): Likewise. * gdbtypes.c (lookup_primitive_typename): Likewise. (lookup_template_type, add_mangled_type, print_arg_types): Likewise. * gdbtypes.h (TYPE_UNSIGNED, TYPE_NOSIGN, TYPE_STUB) (TYPE_TARGET_STUB, TYPE_STATIC, TYPE_CONST, TYPE_VOLATILE) (TYPE_PROTOTYPED, TYPE_INCOMPLETE, TYPE_CODE_SPACE, TYPE_VARARGS) (TYPE_VECTOR): Likewise. * hpread.c (hpread_read_struct_type) (fix_static_member_physnames, fixup_class_method_type) (hpread_type_lookup): Likewise. * mdebugread.c (parse_symbol, parse_type): Likewise. * p-lang.c (is_pascal_string_type): Likewise. * valops.c (hand_function_call): Likewise. * x86-64-tdep.c (classify_argument): Likewise. * hpread.c (hpread_read_function_type) (hpread_read_doc_function_type): Call replace_type. * dstread.c (create_new_type): Delete. (decode_dst_structure, process_dst_function): Call alloc_type. Use type access macros.
Diffstat (limited to 'gdb/dstread.c')
-rw-r--r--gdb/dstread.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/gdb/dstread.c b/gdb/dstread.c
index c3a73f0..abcce09 100644
--- a/gdb/dstread.c
+++ b/gdb/dstread.c
@@ -705,17 +705,6 @@ dst_sym_addr (dst_sect_ref_t *ref)
+ ref->sect_offset;
}
-static struct type *
-create_new_type (struct objfile *objfile)
-{
- struct type *type;
-
- type = (struct type *)
- obstack_alloc (&objfile->symbol_obstack, sizeof (struct type));
- memset (type, 0, sizeof (struct type));
- return type;
-}
-
static struct symbol *
create_new_symbol (struct objfile *objfile, char *name)
{
@@ -865,7 +854,7 @@ decode_dst_structure (struct objfile *objfile, dst_rec_ptr_t entry, int code,
xfree (name);
return type;
}
- type = create_new_type (objfile);
+ type = alloc_type (objfile);
TYPE_NAME (type) = obstack_copy0 (&objfile->symbol_obstack,
name, strlen (name));
xfree (name);
@@ -1306,10 +1295,10 @@ process_dst_function (struct objfile *objfile, dst_rec_ptr_t entry, char *name,
if (!type->function_type)
{
- ftype = create_new_type (objfile);
+ ftype = alloc_type (objfile);
type->function_type = ftype;
- ftype->target_type = type;
- ftype->code = TYPE_CODE_FUNC;
+ TYPE_TARGET_TYPE (ftype) = type;
+ TYPE_CODE (ftype) = TYPE_CODE_FUNC;
}
SYMBOL_TYPE (sym) = type->function_type;