diff options
author | Andrew Burgess <aburgess@redhat.com> | 2022-06-08 13:35:29 +0100 |
---|---|---|
committer | Andrew Burgess <aburgess@redhat.com> | 2022-06-09 14:40:48 +0100 |
commit | 08b326ee0a6384508703f9187905bb00bfe3d5d9 (patch) | |
tree | a83e7de6f0981827208b9237500975dccfe0db49 /gdb/testsuite/lib/gdb-python.exp | |
parent | 1562f64fec2ce6a31bc534be73e9e4180edbb600 (diff) | |
download | gdb-08b326ee0a6384508703f9187905bb00bfe3d5d9.zip gdb-08b326ee0a6384508703f9187905bb00bfe3d5d9.tar.gz gdb-08b326ee0a6384508703f9187905bb00bfe3d5d9.tar.bz2 |
gdb/testsuite: make 'c' default language for get/test compiler info
This commit is a minor cleanup for the two functions (in gdb.exp)
get_compiler_info and test_compiler_info.
Instead of using the empty string as the default language, and just
"knowing" that this means the C language. Make this explicit. The
language argument now defaults to "c" if not specified, and the if
chain in get_compiler_info that checks the language not explicitly
handles "c" and gives an error for unknown languages.
This is a good thing, now that the API appears to take a language, if
somebody does:
test_compiler_info "xxxx" "rust"
to check the version of the rust compiler then we will now give an
error rather than just using the C compiler and leaving the user
having to figure out why they are not getting the results they
expect.
After a little grepping, I think the only place we were explicitly
passing the empty string to either get_compiler_info or
test_compiler_info was in gdb_compile_shlib_1, this is now changed to
pass "c" as the default language.
There should be no changes to the test results after this commit.
Diffstat (limited to 'gdb/testsuite/lib/gdb-python.exp')
0 files changed, 0 insertions, 0 deletions