fix qemu_autotest, start writing gdb autotest script