use gdb to command test funciton, gdbscript