warning (_("cannot close \"%s\": %s"),
vp->name, bfd_errmsg (bfd_get_error ()));
- /* FIXME: This routine is #if 0'd in symfile.c. What should we
- be doing here? Should we just free everything in
- vp->objfile->symtabs? Should free_objfile do that?
- FIXME-as-well: free_objfile already free'd vp->name, so it isn't
- valid here. */
- free_named_symtabs (vp->name);
xfree (vp);
}
char *scratch_pathname;
int scratch_chan;
struct target_section *sections = NULL, *sections_end = NULL;
+ char **matching;
scratch_chan = openp (getenv ("PATH"), OPF_TRY_CWD_FIRST, filename,
write_files ? O_RDWR | O_BINARY : O_RDONLY | O_BINARY,
scratch_pathname = xstrdup (scratch_pathname);
cleanups = make_cleanup (xfree, scratch_pathname);
- if (!bfd_check_format (exec_bfd, bfd_object))
+ if (!bfd_check_format_matches (exec_bfd, bfd_object, &matching))
{
/* Make sure to close exec_bfd, or else "run" might try to use
it. */
exec_close ();
error (_("\"%s\": not in executable format: %s"),
- scratch_pathname, bfd_errmsg (bfd_get_error ()));
+ scratch_pathname,
+ gdb_bfd_errmsg (bfd_get_error (), matching));
}
/* FIXME - This should only be run for RS6000, but the ifdef is a poor
printf_filtered (_("file type %s.\n"), bfd_get_target (abfd));
if (abfd == exec_bfd)
{
- bfd_vma displacement;
+ /* gcc-3.4 does not like the initialization in <p == t->sections_end>. */
+ bfd_vma displacement = 0;
for (p = t->sections; p < t->sections_end; p++)
{
}
}
if (p == t->sections_end)
- {
- warning (_("Cannot find section for the entry point of %s.\n"),
- bfd_get_filename (abfd));
- displacement = 0;
- }
+ warning (_("Cannot find section for the entry point of %s.\n"),
+ bfd_get_filename (abfd));
printf_filtered (_("\tEntry point: %s\n"),
paddress (gdbarch, (bfd_get_start_address (abfd)