diff options
author | Tom Tromey <tromey@adacore.com> | 2022-11-30 11:27:10 -0700 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2022-12-01 08:28:20 -0700 |
commit | 9a7fde04ca4232d4b2efed61486fff65e83ab3a2 (patch) | |
tree | 79ce2f78ee0a2610532e4a5ffc90421aa1083a93 /gdb/testsuite/gdb.compile/compile-cplus-namespace.exp | |
parent | 5b92bbd934059eb06cf531c268627deef53886aa (diff) | |
download | gdb-9a7fde04ca4232d4b2efed61486fff65e83ab3a2.zip gdb-9a7fde04ca4232d4b2efed61486fff65e83ab3a2.tar.gz gdb-9a7fde04ca4232d4b2efed61486fff65e83ab3a2.tar.bz2 |
Avoid timeouts in gdb.compile
PR compile/29541 points out that some of the C++ tests in gdb.compile
will time out when the glibc debuginfo is installed. This was
interfering with my hacking on gdb by making test runs extremely long,
so I looked into it.
Internally the bug seems to be that gdb tries to convert multiple
symbols named "var" via the compiler interface; one such symbol (I
didn't track it down too far) causes the C++ compiler plugin to crash.
Unfortunately, the crash is reported as a timeout, as the gdb side of
the plugin simply hangs. This seems like a bug in the plugin RPC
mechanism and, worse, apparently when I wrote this stuff I didn't
really consider error reporting very much at all, so gdb can't really
detect failures in the first place.
Anyway... this patch works around the timeout by compiling a simple
test that should provoke this bug, and then using "untested" if it
notices a GCC crash.
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29541
Diffstat (limited to 'gdb/testsuite/gdb.compile/compile-cplus-namespace.exp')
-rw-r--r-- | gdb/testsuite/gdb.compile/compile-cplus-namespace.exp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/gdb/testsuite/gdb.compile/compile-cplus-namespace.exp b/gdb/testsuite/gdb.compile/compile-cplus-namespace.exp index 4fc626b..ec4d009 100644 --- a/gdb/testsuite/gdb.compile/compile-cplus-namespace.exp +++ b/gdb/testsuite/gdb.compile/compile-cplus-namespace.exp @@ -33,15 +33,13 @@ if {![runto_main]} { return -1 } -if {[skip_compile_feature_tests]} { - untested \ - "compile command not supported (could not find libcc1 shared library?)" - return -1 -} - gdb_breakpoint [gdb_get_line_number "break here" $srcfile] gdb_continue_to_breakpoint "testing location" +if {[skip_compile_feature_untested "var = 0"]} { + return -1 +} + CompileExpression::new "var" CompileExpression::test "N1::N2::N3::N4::n4static" 400 CompileExpression::test "N1::N2::N3::N4::S4::s4static" 40 |