Re: GDB version as convenience variable

Eli Zaretskii
2019-03-30T10:01:08Z

> From: Simon Marchi <simark@simark.ca>
> Cc: gdb-patches@sourceware.org, brobecker@adacore.com
> Date: Tue, 26 Mar 2019 10:46:56 -0400
>
> Apparently, the test default.exp needs to be changed in any case, because
> it adds new convenience variables. Without modification, the
> "show convenience" test fails because there is a new entry it doesn't know
> about.
>
> So for now, I would suggest adding the modification below to your patch to keep
> the test passing. It is not obvious to change the test to match the convenience
> variable value against a variable or even against a regexp, because it uses
> gdb_test_list_exact, which does straight string comparison.
>
> Also, I am not sure if reading the output of "show version" and testing against
> that would be a really good test, because the implementation and the test would
> work essentially work the same way. So if the version string erroneously becomes
> 0.0.0 because of some bug in some script, the test would still pass, even though
> the values are wrong.
>
> At least, the following is simple and robust.

Thanks, I used that, and pushed the changes including this one.