* top.c (execute_command): Select a frame before checking the current
authorDaniel Jacobowitz <drow@false.org>
Thu, 5 Nov 2009 20:43:52 +0000 (20:43 +0000)
committerDaniel Jacobowitz <drow@false.org>
Thu, 5 Nov 2009 20:43:52 +0000 (20:43 +0000)
language.  Only output a message if verbose.

gdb/ChangeLog
gdb/top.c

index bc6f91119c77587b5f11757bcea134bfd9287ade..b30cb8c9654aca338f1fefc870d34e23b37d6406 100644 (file)
@@ -1,3 +1,8 @@
+2009-11-05  Daniel Jacobowitz  <dan@codesourcery.com>
+
+       * top.c (execute_command): Select a frame before checking the current
+       language.  Only output a message if verbose.
+
 2009-11-05  Tom Tromey  <tromey@redhat.com>
 
        * symtab.h (SYMBOL_SET_LINKAGE_NAME): Update comment.
index 02997c722e16b851e63d584cba8e53b8fc77cbff..b6701b6ab870f11cb9174a549acc88641c9676d6 100644 (file)
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -457,10 +457,13 @@ execute_command (char *p, int from_tty)
 
     }
 
-  /* Tell the user if the language has changed (except first time).  */
+  /* Tell the user if the language has changed (except first time).
+     First make sure that a new frame has been selected, in case this
+     command or the hooks changed the program state.  */
+  deprecated_safe_get_selected_frame ();
   if (current_language != expected_language)
     {
-      if (language_mode == language_mode_auto)
+      if (language_mode == language_mode_auto && info_verbose)
        {
          language_info (1);    /* Print what changed.  */
        }
This page took 0.040331 seconds and 4 git commands to generate.