Index: symfile.c =================================================================== --- symfile.c (revision 45) +++ symfile.c (revision 46) @@ -87,8 +87,6 @@ static int simple_read_overlay_region_ta 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); @@ -1576,7 +1574,7 @@ symbol_file_command (char *args, int fro 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; Index: symfile.h =================================================================== --- symfile.h (revision 45) +++ symfile.h (revision 46) @@ -292,6 +292,8 @@ extern int auto_solib_limit; /* 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 *); Index: language.c =================================================================== --- language.c (revision 45) +++ language.c (revision 46) @@ -43,6 +43,7 @@ #include "parser-defs.h" #include "jv-lang.h" #include "demangle.h" +#include "symfile.h" extern void _initialize_language (void); @@ -185,11 +186,14 @@ local or auto Automatic setting based /* 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; } Index: Makefile.in =================================================================== --- Makefile.in (revision 45) +++ Makefile.in (revision 46) @@ -2323,7 +2323,7 @@ jv-valprint.o: jv-valprint.c $(defs_h) $ $(language_h) $(jv_lang_h) $(c_lang_h) $(annotate_h) $(gdb_string_h) language.o: language.c $(defs_h) $(gdb_string_h) $(symtab_h) $(gdbtypes_h) \ $(value_h) $(gdbcmd_h) $(expression_h) $(language_h) $(target_h) \ - $(parser_defs_h) $(jv_lang_h) $(demangle_h) + $(parser_defs_h) $(jv_lang_h) $(demangle_h) $(symfile_h) libunwind-frame.o: libunwind-frame.c $(defs_h) $(inferior_h) $(frame_h) \ $(frame_base_h) $(frame_unwind_h) $(gdbcore_h) $(gdbtypes_h) \ $(symtab_h) $(objfiles_h) $(regcache_h) $(gdb_assert_h) \