rungdbserver 484 B

123456789101112131415161718192021222324252627
  1. #!/usr/bin/env bash
  2. set -eu
  3. . common
  4. set -- ${cli_rungdbserver:-} "$@"
  5. gem5=false
  6. while getopts a:g OPT; do
  7. case "$OPT" in
  8. a)
  9. arch="$OPTARG"
  10. ;;
  11. g)
  12. gem5=true
  13. ;;
  14. esac
  15. done
  16. shift "$(($OPTIND - 1))"
  17. executable="$1"
  18. set_common_vars "$arch" "$gem5"
  19. "${host_dir}/usr/bin/${arch}-linux-gdb" \
  20. -q \
  21. -ex "set sysroot ${buildroot_out_dir}/staging" \
  22. -ex 'target remote localhost:45455' \
  23. -ex 'tb main' \
  24. -ex 'c' \
  25. "${build_dir}/${executable}" \
  26. ;