This fixes an incorrect invocation of gdb on remote targets where DejaGNU would try to run host's gdb in remote target simulator. gdb-test skips the testing when target is remote or non native but the gdb version check function does not. libstdc++-v3/ChangeLog: * testsuite/lib/gdb-test.exp (gdb_batch_check): Exit if non native or remote target.