/* 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);
}