SYMBOL_DOMAIN (sym) = VAR_DOMAIN;
SYMBOL_ACLASS_INDEX (sym) = LOC_OPTIMIZED_OUT;
SYMBOL_SET_LINKAGE_NAME
- (sym, (char *) obstack_copy0 (&objfile->objfile_obstack,
- name, pp - name));
+ (sym, obstack_strndup (&objfile->objfile_obstack,
+ name, pp - name));
pp += 2;
if (*(pp - 1) == 'F' || *(pp - 1) == 'f')
{
std::string new_name = cp_canonicalize_string (name);
if (!new_name.empty ())
- {
- type_name
- = (char *) obstack_copy0 (&objfile->objfile_obstack,
- new_name.c_str (),
- new_name.length ());
- }
+ type_name = obstack_strdup (&objfile->objfile_obstack,
+ new_name);
}
if (type_name == NULL)
{
case 'S': /* Set type */
type1 = read_type (pp, objfile);
- type = create_set_type ((struct type *) NULL, type1);
+ type = create_set_type (NULL, type1);
if (typenums[0] != -1)
*dbx_lookup_type (typenums, objfile) = type;
break;
struct gdbarch *gdbarch = get_objfile_arch (objfile);
fip->list->field.name
- = (const char *) obstack_copy0 (&objfile->objfile_obstack, *pp, p - *pp);
+ = obstack_strndup (&objfile->objfile_obstack, *pp, p - *pp);
*pp = p + 1;
/* This means we have a visibility for a field coming. */
}
range_type =
- create_static_range_type ((struct type *) NULL, index_type, lower, upper);
+ create_static_range_type (NULL, index_type, lower, upper);
type = create_array_type (type, element_type, range_type);
return type;
p = *pp;
while (*p != ':')
p++;
- name = (char *) obstack_copy0 (&objfile->objfile_obstack, *pp, p - *pp);
+ name = obstack_strndup (&objfile->objfile_obstack, *pp, p - *pp);
*pp = p + 1;
n = read_huge_number (pp, ',', &nbits, 0);
if (nbits != 0)
}
result_type
- = create_static_range_type ((struct type *) NULL, index_type, n2, n3);
+ = create_static_range_type (NULL, index_type, n2, n3);
return (result_type);
}
}
common_block = *get_local_symbols ();
common_block_i = common_block ? common_block->nsyms : 0;
- common_block_name = (char *) obstack_copy0 (&objfile->objfile_obstack, name,
- strlen (name));
+ common_block_name = obstack_strdup (&objfile->objfile_obstack, name);
}
/* Process a N_ECOMM symbol. */