Re: [PATCHv2] Restore gdb.SYMBOL_STRUCT_DOMAIN constant

Tom Tromey
2021-06-10T18:48:53Z

>>>>> "Tom" == Tom de Vries <tdevries@suse.de> writes:

Tom> Maybe easy enough to warn about in gdb_test_multiple:
Tom> ...
Tom> if { [regexp -line {python print +[^(]} $command] } {
Tom> warning [concat \
Tom> "Missing parentheses in python print command," \
Tom> " will fail with python3"]
Tom> }
Tom> ...
Tom> ?

Tom> Or, even correct automatically:
Tom> ...

Tom> if { [regexp -line {python print +[^(]} $command] } {
Tom> set command [regsub {python print (.*)} $command \
Tom> {python print (\1)}]
Tom> }
Tom> ...
Tom> ?

I find auto-fixing pretty funny somehow, but I feel like it might be
confusing or even bite us someday.

Another way out would be a new proc to wrap "python print" so that it's
just not possible to mess up.

Tom