mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-13 20:12:26 +00:00
21 lines
455 B
Bash
Executable File
21 lines
455 B
Bash
Executable File
#!/bin/sh
|
|
arch='x86_64'
|
|
while getopts a:k OPT; do
|
|
case "$OPT" in
|
|
a)
|
|
arch="$OPTARG"
|
|
;;
|
|
esac
|
|
done
|
|
shift "$(($OPTIND - 1))"
|
|
executable="$1"
|
|
buildroot_out_dir="$(pwd)/buildroot/output.${arch}~"
|
|
"${buildroot_out_dir}/host/usr/bin/${arch}-linux-gdb" \
|
|
-q \
|
|
-ex "set sysroot ${buildroot_out_dir}/staging" \
|
|
-ex 'target remote localhost:45455' \
|
|
-ex 'tb main' \
|
|
-ex 'c' \
|
|
"${buildroot_out_dir}/build/${executable}" \
|
|
;
|