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.
This commit is contained in:
Ciro Santilli
2018-08-09 05:44:52 +01:00
parent b8abb15ca7
commit 1cb056a995
16 changed files with 192 additions and 200 deletions

View File

@@ -5,21 +5,21 @@ set -- ${cli_rungdbserver:-} "$@"
while getopts a:g OPT; do
case "$OPT" in
a)
arch="$OPTARG"
common_arch="$OPTARG"
;;
g)
gem5=true
common_gem5=true
;;
esac
done
shift "$(($OPTIND - 1))"
executable="$1"
set_common_vars "$arch" "$gem5"
"${host_dir}/usr/bin/${arch}-linux-gdb" \
common_setup
"${common_host_dir}/usr/bin/${common_arch}-linux-gdb" \
-q \
-ex "set sysroot ${buildroot_out_dir}/staging" \
-ex "set sysroot ${common_buildroot_out_dir}/staging" \
-ex "target remote localhost:${common_qemu_hostfwd_generic_port}" \
-ex 'tb main' \
-ex 'c' \
"${build_dir}/${executable}" \
"${common_build_dir}/${executable}" \
;