[gdb/testsuite] Fix gdb.python/py-section-script.exp with older objdump

On AlmaLinux 9.8 ppc64le with objdump 2.35.2 I run into:
...
ERROR: tcl error sourcing gdb/testsuite/gdb.python/py-section-script.exp.
ERROR: tcl error code CHILDSTATUS 3614626 1
ERROR: objdump: unrecognized option '--decompress'
...

Fix this by using remote_exec instead of exec, and checking the result.

Tested on x86_64-linux and ppc64le-linux.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=33931
1 file changed