Consider the following scenario: (gdb) file my_c_program (gdb) show lang The current source language is "auto; currently c". (gdb) set lang ada Now, try to set the language_mode back to "auto", and see what the language is: (gdb) set lang auto (gdb) show lang The current source language is "auto". We forgot to set the language! This was reported to us a while ago by the GPS team (GPS is an IDE that contains a frontend to GDB), because they rely in some occasions on GDB to tell them what the language is. The attached patch fixes the problem. 2008-01-02 Joel Brobecker * 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. I also wrote a tiny testcase: 2008-01-02 Joel Brobecker * gdb.base/set_lang_auto.exp: New testcase. All tested on x86-linux, no regression. OK to commit? Thanks, -- Joel