1 #!/bin/bash 2 3 REMOTE_SSH_FLAGS="-i __tmp_testing_rsa__ -o StrictHostKeyChecking=no -o CheckHostIP=no -o BatchMode=yes -o ControlMaster=auto -o ControlPath=__tmp_dir__/%r@%h:%p" 4 FLAGS_remote=__board_hostname__ 5 6 gdbserver_cmd="/usr/local/bin/gdbserver $1 $2 $3" 7 ssh_cmd="nohup ${gdbserver_cmd} " 8 9 echo "Executing: ssh ${RSA_FILE} ${REMOTE_SSH_FLAGS} root@${FLAGS_remote} \"${ssh_cmd}\"" >&2 10 11 ssh ${REMOTE_SSH_FLAGS} root@${FLAGS_remote} "killall -9 gdbserver; ${ssh_cmd}" 12 13