aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/language.c2
-rw-r--r--gdb/testsuite/gdb.base/langs.exp9
2 files changed, 10 insertions, 1 deletions
diff --git a/gdb/language.c b/gdb/language.c
index 0e6a1a4..0846b3e 100644
--- a/gdb/language.c
+++ b/gdb/language.c
@@ -384,7 +384,7 @@ language_info ()
expected_language = current_language;
printf_filtered (_("Current language: %s\n"), language);
- show_language_command (NULL, 1, NULL, NULL);
+ show_language_command (gdb_stdout, 1, NULL, NULL);
}
/* This page contains functions for the printing out of
diff --git a/gdb/testsuite/gdb.base/langs.exp b/gdb/testsuite/gdb.base/langs.exp
index 134cde1..9c78a8a 100644
--- a/gdb/testsuite/gdb.base/langs.exp
+++ b/gdb/testsuite/gdb.base/langs.exp
@@ -117,6 +117,15 @@ if [runto csub] then {
gdb_test "print x" \
"expression parsing not implemented for language .Unknown." \
"expression parsing does not crash for unknown"
+
+ gdb_test_no_output "set lang auto" \
+ "set lang back to auto for verbose test"
+ gdb_test_no_output "set verbose on"
+ if { !$isfixed } { set lang c\\+\\+; set ext cxx }
+ if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+ gdb_test "up" \
+ ".* in (foo|$foo_func).* at .*langs2\\.$ext.*return csub \\(.*Current language: auto.*" \
+ "up to foo in langs.exp when verbose"
}
set timeout $oldtimeout