Files
linux-kernel-module-cheat/rungdbserver
Ciro Santilli 1cb056a995 common: simplify set_common_vars, rename to common_setup
Don't pass all arguments explicitly, just use existing vars.

Prefix all common_setup inputs and outputs with common_ to avoid name conflicts.
2018-08-09 06:59:52 +01:00

26 lines
574 B
Bash
Executable File

#!/usr/bin/env bash
set -eu
. "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/common"
set -- ${cli_rungdbserver:-} "$@"
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}" \
;