Avoid crash in language_info
authorTom Tromey <tromey@adacore.com>
Wed, 5 Jan 2022 17:42:25 +0000 (10:42 -0700)
committerTom Tromey <tromey@adacore.com>
Thu, 6 Jan 2022 14:54:30 +0000 (07:54 -0700)
commit5220f61a22a0c1a84403725532d6359aaeb3d2fa
tree160b393a372d1b5860d44742735a1ea117c8304b
parentd8504344d476f90bffca815b33b69fd778677478
Avoid crash in language_info

language_info calls:

  show_language_command (NULL, 1, NULL, NULL);

... "knowing" that show_language_command does not use its ui_file
parameter.  However, this was changed in commit 7514a661
("Consistently Use ui_file parameter to show callbacks").

This patch changes language_info to pass a ui_file.

It took a while to write the test -- this function is only called when
'verbose' is on and when switching the "expected" language in auto
mode.
gdb/language.c
gdb/testsuite/gdb.base/langs.exp