From: drow Date: Fri, 6 Nov 2009 05:43:52 +0000 (+0000) Subject: * top.c (execute_command): Select a frame before checking the current X-Git-Tag: cgen-snapshot-20091201~379 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=fa49e9f3d54313d698b4cbf3b0552d590dfd3875;p=pf3gnuchains%2Fpf3gnuchains4x.git * top.c (execute_command): Select a frame before checking the current language. Only output a message if verbose. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index bc6f91119c..b30cb8c965 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2009-11-05 Daniel Jacobowitz + + * top.c (execute_command): Select a frame before checking the current + language. Only output a message if verbose. + 2009-11-05 Tom Tromey * symtab.h (SYMBOL_SET_LINKAGE_NAME): Update comment. diff --git a/gdb/top.c b/gdb/top.c index 02997c722e..b6701b6ab8 100644 --- 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. */ }