Files
linux-kernel-module-cheat/rungdbserver
2018-08-09 07:12:20 +01:00

24 lines
532 B
Bash
Executable File

#!/usr/bin/env bash
. "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/common"
while getopts a:g OPT; do
case "$OPT" in
a)
common_arch="$OPTARG"
;;
g)
common_gem5=true
;;
esac
done
shift "$(($OPTIND - 1))"
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}" \
;