rungdbserver 455 B

123456789101112131415161718192021
  1. #!/bin/sh
  2. arch='x86_64'
  3. while getopts a:k OPT; do
  4. case "$OPT" in
  5. a)
  6. arch="$OPTARG"
  7. ;;
  8. esac
  9. done
  10. shift "$(($OPTIND - 1))"
  11. executable="$1"
  12. buildroot_out_dir="$(pwd)/buildroot/output.${arch}~"
  13. "${buildroot_out_dir}/host/usr/bin/${arch}-linux-gdb" \
  14. -q \
  15. -ex "set sysroot ${buildroot_out_dir}/staging" \
  16. -ex 'target remote localhost:45455' \
  17. -ex 'tb main' \
  18. -ex 'c' \
  19. "${buildroot_out_dir}/build/${executable}" \
  20. ;