}
new_symfile_objfile (objfile, mainline, from_tty);
-
- /* Getting new symbols may change our opinion about what is
- frameless. */
-
- reinit_frame_cache ();
return (objfile);
}
else
symbol_file_add (name, from_tty, (CORE_ADDR)text_relocation,
0, mapped, readnow);
+
+ /* Getting new symbols may change our opinion about what is
+ frameless. */
+ reinit_frame_cache ();
+
set_initial_language ();
}
argv++;
error ("Not confirmed.");
symbol_file_add (name, 0, text_addr, 0, mapped, readnow);
+
+ /* Getting new symbols may change our opinion about what is
+ frameless. */
+ reinit_frame_cache ();
}
\f
static void
struct section_offsets *offsets;
int num_offsets;
int section_offsets_size;
+ char *obfd_filename;
printf_filtered ("`%s' has changed; re-reading symbols.\n",
objfile->name);
/* Clean up any state BFD has sitting around. We don't need
to close the descriptor but BFD lacks a way of closing the
BFD without closing the descriptor. */
+ obfd_filename = bfd_get_filename (objfile->obfd);
if (!bfd_close (objfile->obfd))
error ("Can't close BFD for %s.", objfile->name);
- objfile->obfd = bfd_openr (objfile->name, gnutarget);
+ objfile->obfd = bfd_openr (obfd_filename, gnutarget);
if (objfile->obfd == NULL)
error ("Can't open %s to read symbols.", objfile->name);
/* bfd_openr sets cacheable to true, which is what we want. */
return language_cplus;
else if (STREQ (c, ".ch") || STREQ (c, ".c186") || STREQ (c, ".c286"))
return language_chill;
+ else if (STREQ (c, ".f") || STREQ (c, ".F"))
+ return language_fortran;
else if (STREQ (c, ".mod"))
return language_m2;
else if (STREQ (c, ".s") || STREQ (c, ".S"))
SYMBOL_LANGUAGE (psym) = language;
PSYMBOL_NAMESPACE (psym) = namespace;
PSYMBOL_CLASS (psym) = class;
- SYMBOL_INIT_DEMANGLED_NAME (psym, &objfile->psymbol_obstack);
+ SYMBOL_INIT_LANGUAGE_SPECIFIC (psym, language);
}
/* Add a symbol with a CORE_ADDR value to a psymtab. */
SYMBOL_LANGUAGE (psym) = language;
PSYMBOL_NAMESPACE (psym) = namespace;
PSYMBOL_CLASS (psym) = class;
- SYMBOL_INIT_DEMANGLED_NAME (psym, &objfile->psymbol_obstack);
+ SYMBOL_INIT_LANGUAGE_SPECIFIC (psym, language);
}
#endif /* !INLINE_ADD_PSYMBOL */