[RFA] Emit a warning for ineffective set VAR = EXP command

Doug Evans dje@google.com
Thu May 3 16:33:00 GMT 2012


On Thu, May 3, 2012 at 8:05 AM, Joel Brobecker <brobecker@adacore.com> wrote:
>> Ok with one more change.
>>
>> -gdb_test "set language ada" ".*" "set language ada"
>> +gdb_test_no_output "set language ada"
>
> There is going to be some output, because this command is forcing
> a language which does not match the frame.

Ah.

>> [I'm assuming the warning test has the desired affect.  I don't know ada. :-)]
>
> Correct, it's a `='/`==' vs `:='/'=' confusion. In Ada, the comparison
> operator is "=". The user should have used the assignment operator which
> is ":=".  The number of times I got bitten by this....

It's trivial to add tests for a few more languages.
Whether it's worth it, I don't know.
It may be worth it if only as an educational vehicle so people who
don't know these other languages get exposed to them for this
particular issue.



More information about the Gdb-patches mailing list