mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 10:15:57 +01:00
21 lines
520 B
Bash
Executable File
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}" \
|
|
;
|