[PATCH v2] Don't compare types of enum fields
Hannes Domani
ssbssa@yahoo.de
Fri Dec 18 22:00:18 GMT 2020
Am Freitag, 18. Dezember 2020, 22:28:06 MEZ hat Simon Marchi <simon.marchi@polymtl.ca> Folgendes geschrieben:
> On 2020-12-17 2:29 p.m., Hannes Domani via Gdb-patches wrote:
> > +
> > +if { [skip_python_tests] } { continue }
>
> I suppose this can go earlier, to avoid compiling the program and starting GDB if
> the test is going to be skipped anyway.
It fails spectacularly when I try this:
ERROR: tcl error sourcing /c/src/repos/gdb-testsuite/gdb/testsuite/gdb.base/compare-enum-type.exp.
ERROR: can't read "use_gdb_stub": no such variable
while executing
"if {$use_gdb_stub
&& [regexp -nocase {^\s*(r|run|star|start|at|att|atta|attac|attach)\M} $command]} {
error "gdbserver does not support $command wi..."
(procedure "gdb_test_multiple" line 47)
invoked from within
"gdb_test_multiple "python print ('test')" "verify python support" -prompt "$prompt_regexp" {
-re "not supported.*$prompt_regexp" {
unsupported..."
(procedure "skip_python_tests_prompt" line 4)
invoked from within
"skip_python_tests_prompt "$gdb_prompt $""
(procedure "skip_python_tests" line 3)
invoked from within
"skip_python_tests"
(file "/c/src/repos/gdb-testsuite/gdb/testsuite/gdb.base/compare-enum-type.exp" line 18)
invoked from within
"source /c/src/repos/gdb-testsuite/gdb/testsuite/gdb.base/compare-enum-type.exp"
("uplevel" body line 1)
invoked from within
"uplevel #0 source /c/src/repos/gdb-testsuite/gdb/testsuite/gdb.base/compare-enum-type.exp"
invoked from within
"catch "uplevel #0 source $test_file_name""
testcase /c/src/repos/gdb-testsuite/gdb/testsuite/gdb.base/compare-enum-type.exp completed in 0 seconds
> > +
> > +gdb_test "py print(gdb.parse_and_eval('e1').type == gdb.parse_and_eval('e2').type)" "True"
>
>
> I think it would make sense to move this test to the gdb.python directory.
I wasn't sure about that, because even though I use python to test it, it's
actually testing check_types_equal (a gdb base function).
Hannes
More information about the Gdb-patches
mailing list