mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-26 03:31:36 +01:00
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:
10
rungdb
10
rungdb
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user