Files
linux-kernel-module-cheat/rungdbserver
Ciro Santilli 036225b268 run: use getopt
2018-08-23 08:54:47 +01:00

22 lines
563 B
Bash
Executable File

#!/usr/bin/env bash
. "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/common"
parsed=$(getopt -o "${common_getopt_flags}" -l "$common_getopt_flags_long" -- "$@")
eval set -- "$parsed"
while true; do
case "$1" in
*)
common_getopt_case "$@"
;;
esac
done
executable="$1"
common_setup
"${common_host_dir}/usr/bin/${common_arch}-linux-gdb" \
-q \
-ex "set sysroot ${common_buildroot_out_dir}/staging" \
-ex "target remote localhost:${common_qemu_hostfwd_generic_port}" \
-ex 'tb main' \
-ex 'c' \
"${common_build_dir}/${executable}" \
;