[gdb/testsuite] Fix gdb.python/py-section-script.exp with make-check-all.sh

When running test-case gdb.python/py-section-script.exp with
make-check-all.sh, I get:
...
LOCAL:
 # of expected passes		38
TARGET BOARD: read1
 # of expected passes		38
TARGET BOARD: readmore
 # of expected passes		38
TARGET BOARD: cc-with-gdb-index
 # of expected passes		38
TARGET BOARD: cc-with-index-cache
 # of untested testcases		1
TARGET BOARD: cc-with-debug-names
FAIL: $exp: variant=compressed: gdb_breakpoint: set breakpoint at main
 # of expected passes		25
 # of unexpected failures	1
TARGET BOARD: cc-with-dwz
 # of expected passes		19
 # of untested testcases		1
TARGET BOARD: cc-with-dwz-m
 # of expected passes		19
 # of untested testcases		1
TARGET BOARD: cc-with-gnu-debuglink
ERROR: Undefined command "test-cmd 1 2 3".
FAIL: $exp: variant=plain: sepdebug from eu-strip: verify scripts loaded
FAIL: $exp: variant=plain: sepdebug from objcopy: strip py-section-script-plain-objcopy debuginfo
FAIL: $exp: variant=plain: verify scripts loaded
 # of expected passes		12
 # of unexpected failures	3
 # of unresolved testcases	1
TARGET BOARD: debug-types
 # of expected passes		38
TARGET BOARD: dwarf4-gdb-index
 # of expected passes		38
TARGET BOARD: dwarf5-fission-debug-types
 # of expected passes		38
TARGET BOARD: dwarf64
 # of expected passes		38
TARGET BOARD: fission
 # of untested testcases		1
TARGET BOARD: fission-dwp
 # of untested testcases		1
TARGET BOARD: gold
 # of untested testcases		1
TARGET BOARD: gold-gdb-index
 # of untested testcases		1
TARGET BOARD: readnow
 # of expected passes		38
TARGET BOARD: native-extended-gdbserver
 # of expected passes		38
TARGET BOARD: native-gdbserver
 # of expected passes		38
TARGET BOARD: native-stdio-gdbserver
 # of expected passes		38
TARGET BOARD: remote-gdbserver-on-localhost
 # of expected passes		38
TARGET BOARD: remote-stdio-gdbserver
 # of expected passes		38
HOST BOARD: local-remote-host, TARGET BOARD: remote-gdbserver-on-localhost
 # of untested testcases		1
HOST BOARD: local-remote-host, TARGET BOARD: remote-stdio-gdbserver
 # of untested testcases		1
HOST BOARD: local-remote-host-notty, TARGET BOARD: remote-gdbserver-on-localhost
 # of untested testcases		1
HOST BOARD: local-remote-host-notty, TARGET BOARD: remote-stdio-gdbserver
 # of untested testcases		1
HOST/TARGET BOARD: local-remote-host-native
 # of untested testcases		1
...

I've filed a PR about the cc-with-debug-names failure [1].

The untested for remote host configurations is because of compilation failure.

There's some evidence of remote host support in the test-case, but making it
work in general requires a lot of changes, because the test-case is
file-manipulation heavy.  Instead, just require local host and remove any
suggestion that remote host is supported.

Finally, cc-with-gnu-debuglink config fails because it moves the
.debug_gdb_scripts section out of the executable.  Detect this and bail out.

[1] https://sourceware.org/bugzilla/show_bug.cgi?id=34440
1 file changed