Files
linux-kernel-module-cheat/rungdbserver
2018-08-14 00:27:55 +01:00

21 lines
520 B
Bash
Executable File

#!/usr/bin/env bash
. "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/common"
while getopts "${common_getopts_flags}" OPT; do
case "$OPT" in
?)
common_getopts_case "$OPT"
;;
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}" \
;