args.resultp = §
bfd_map_over_sections (abfd, find_targ_sec, &args);
if (sect != NULL)
- addr = bfd_get_section_vma (objfile->obfd, sect);
+ addr = bfd_get_section_vma (abfd, sect);
return addr;
}
char *debugfile;
debugfile = find_separate_debug_file_by_debuglink (objfile);
+ make_cleanup (xfree, debugfile);
if (debugfile)
{
bfd *abfd = symfile_bfd_open (debugfile);
+ make_cleanup_bfd_unref (abfd);
symbol_file_add_separate (abfd, symfile_flags, objfile);
- xfree (debugfile);
}
}
cs->c_sclass == C_EXT || cs->c_sclass == C_THUMBEXTFUNC
|| cs->c_sclass == C_THUMBEXT ?
mst_text : mst_file_text;
- tmpaddr = gdbarch_smash_text_address (gdbarch, tmpaddr);
+ tmpaddr = gdbarch_addr_bits_remove (gdbarch, tmpaddr);
}
else if (bfd_section->flags & SEC_ALLOC
&& bfd_section->flags & SEC_LOAD)
coff_getfilename (union internal_auxent *aux_entry)
{
static char buffer[BUFSIZ];
- char *temp;
const char *result;
if (aux_entry->x_file.x_n.x_zeroes == 0)
if (TYPE_NAME (real_target))
{
+ /* The previous copy of TYPE_NAME is allocated by
+ process_coff_symbol. */
if (TYPE_NAME (target))
- xfree (TYPE_NAME (target));
- TYPE_NAME (target) = concat (TYPE_NAME (real_target),
- (char *) NULL);
+ xfree ((char*) TYPE_NAME (target));
+ TYPE_NAME (target) = xstrdup (TYPE_NAME (real_target));
}
}
patch_opaque_types (struct symtab *s)
{
struct block *b;
- struct dict_iterator iter;
+ struct block_iterator iter;
struct symbol *real_sym;
/* Go through the per-file symbols only. */
&& TYPE_CODE (SYMBOL_TYPE (real_sym)) == TYPE_CODE_PTR
&& TYPE_LENGTH (TYPE_TARGET_TYPE (SYMBOL_TYPE (real_sym))) != 0)
{
- char *name = SYMBOL_LINKAGE_NAME (real_sym);
+ const char *name = SYMBOL_LINKAGE_NAME (real_sym);
int hash = hashname (name);
struct symbol *sym, *prev;
}
else
TYPE_NAME (SYMBOL_TYPE (sym)) =
- concat (SYMBOL_LINKAGE_NAME (sym), (char *) NULL);
+ xstrdup (SYMBOL_LINKAGE_NAME (sym));
}
/* Keep track of any type which points to empty structured
SYMBOL_TYPE (xsym) = type;
TYPE_FIELD_NAME (type, n) = SYMBOL_LINKAGE_NAME (xsym);
- SET_FIELD_BITPOS (TYPE_FIELD (type, n), SYMBOL_VALUE (xsym));
+ SET_FIELD_ENUMVAL (TYPE_FIELD (type, n), SYMBOL_VALUE (xsym));
if (SYMBOL_VALUE (xsym) < 0)
unsigned_enum = 0;
TYPE_FIELD_BITSIZE (type, n) = 0;
default_symfile_relocate, /* sym_relocate: Relocate a debug
section. */
+ NULL, /* sym_probe_fns */
&psym_functions
};