* symfile.h (set_initial_language): Add declaration.
* language.c: #include "symfile.h".
(set_language): Call set_initial_language if the frame language
could not be determined.
+2008-01-03 Joel Brobecker <brobecker@adacore.com>
+
+ * symfile.c (set_initial_language): Make non-static.
+ * symfile.h (set_initial_language): Add declaration.
+ * language.c: #include "symfile.h".
+ (set_language): Call set_initial_language if the frame language
+ could not be determined.
+
2008-01-03 Paul N. Hilfinger <hilfinger@adacore.com>
* eval.c (evaluate_subexp_for_address): Provide frame address to
#include "parser-defs.h"
#include "jv-lang.h"
#include "demangle.h"
+#include "symfile.h"
extern void _initialize_language (void);
/* Found it! Go into manual mode, and use this language. */
if (languages[i]->la_language == language_auto)
{
- /* Enter auto mode. Set to the current frame's language, if known. */
+ /* Enter auto mode. Set to the current frame's language, if
+ known, or fallback to the initial language. */
language_mode = language_mode_auto;
flang = get_frame_language ();
if (flang != language_unknown)
set_language (flang);
+ else
+ set_initial_language ();
expected_language = current_language;
return;
}
static void simple_free_overlay_region_table (void);
#endif
-static void set_initial_language (void);
-
static void load_command (char *, int);
static void symbol_file_add_main_1 (char *args, int from_tty, int flags);
stabs we find, but we can't do that until later when we read in
full symbols. */
-static void
+void
set_initial_language (void)
{
struct partial_symtab *pst;
/* From symfile.c */
+extern void set_initial_language (void);
+
extern struct partial_symtab *allocate_psymtab (char *, struct objfile *);
extern void discard_psymtab (struct partial_symtab *);