aboutsummaryrefslogtreecommitdiff
path: root/gdb/top.c
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2009-11-05 20:43:52 +0000
committerDaniel Jacobowitz <drow@false.org>2009-11-05 20:43:52 +0000
commit52efb61a1cc2775bbc56266db0e1749fba7ae449 (patch)
treeb204b2344eab1053abc721cc949f1eb94409b7b9 /gdb/top.c
parentf8b7eaf30a06a95eb0e000f0bb36dcaa92725137 (diff)
downloadgdb-52efb61a1cc2775bbc56266db0e1749fba7ae449.zip
gdb-52efb61a1cc2775bbc56266db0e1749fba7ae449.tar.gz
gdb-52efb61a1cc2775bbc56266db0e1749fba7ae449.tar.bz2
* top.c (execute_command): Select a frame before checking the current
language. Only output a message if verbose.
Diffstat (limited to 'gdb/top.c')
-rw-r--r--gdb/top.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gdb/top.c b/gdb/top.c
index 02997c7..b6701b6 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. */
}