When running test-case gdb.base/readnever.exp with target board readnow, we
have:
...
spawn gdb -nw -nx -data-directory data-directory -ex set sysroot -readnow \
--readnever^M
gdb: '--readnow' and '--readnever' cannot be specified simultaneously^M
ERROR: : spawn id exp19 not open
...
Fix this by skipping the test when -readnow/--readnow is detected in
GDBFLAGS.
Tested on x86_64-linux.
gdb/testsuite/ChangeLog:
2020-04-23 Tom de Vries <tdevries@suse.de>
* gdb.base/readnever.exp: Skip if GDBFLAGS contain -readnow/--readnow.
+2020-04-23 Tom de Vries <tdevries@suse.de>
+
+ * gdb.base/readnever.exp: Skip if GDBFLAGS contain -readnow/--readnow.
+
2020-04-22 Tom de Vries <tdevries@suse.de>
* gdb.mi/dw2-ref-missing-frame-func.c (.debug_aranges): Fix
return -1
}
+# See if we have target board readnow.exp or similar.
+if { [lsearch -exact $GDBFLAGS -readnow] != -1 \
+ || [lsearch -exact $GDBFLAGS --readnow] != -1 } {
+ untested "--readnever not allowed in combination with --readnow"
+ return -1
+}
+
save_vars { GDBFLAGS } {
append GDBFLAGS " --readnever"
clean_restart ${binfile}