mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-26 03:31:36 +01:00
22 lines
563 B
Bash
Executable File
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}" \
|
|
;
|