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

10
rungdb
View File

@@ -14,7 +14,7 @@ while getopts A:a:b:CgkL:n:X OPT; do
after="$OPTARG"
;;
a)
arch="$OPTARG"
common_arch="$OPTARG"
;;
b)
before="$OPTARG"
@@ -24,7 +24,7 @@ while getopts A:a:b:CgkL:n:X OPT; do
docontinue=false
;;
g)
gem5=true
common_gem5=true
;;
k)
kgdb=true
@@ -51,8 +51,8 @@ if [ "$#" -gt 0 ]; then
else
brk=
fi
set_common_vars -L "$common_linux_variant" -n "$common_run_id" "$arch" "$gem5"
gdb="${host_dir}/usr/bin/${arch}-linux-gdb \\
common_setup
gdb="${common_host_dir}/usr/bin/${common_arch}-linux-gdb \\
${before}"
if "$kgdb"; then
cmd="\
@@ -98,5 +98,5 @@ if "$docontinue"; then
${lx_symbols} \
"
fi
"${root_dir}/eeval" "cd '${common_linux_variant_dir}' && \\
"${common_root_dir}/eeval" "cd '${common_linux_variant_dir}' && \\
$cmd $after" "${common_run_dir}/rungdb.sh"