tc: create helper to access toolchain tools

This commit is contained in:
Ciro Santilli
2018-04-19 08:01:01 +01:00
parent 3fdabbda61
commit 9805d333ea
9 changed files with 35 additions and 13 deletions

View File

@@ -3,7 +3,6 @@ set -eu
. common
set -- ${cli_rungdb_user:-} "$@"
usage="$0 <exec-relative-path> [<brk-symbol>]"
gem5=false
gem5_opt=
while getopts a:gh OPT; do
case "$OPT" in
@@ -34,8 +33,7 @@ else
fi
set_common_vars "$arch" "$gem5"
executable="${build_dir}/${executable_rel}"
readelf="${host_dir}/usr/bin/${arch}-linux-readelf"
addr="$("$readelf" -h "$executable" | awk '/Entry/{ print $NF }' )"
addr="$("${root_dir}/runtc" readelf -h "$executable" | awk '/Entry/{ print $NF }' )"
ex="-ex \"add-symbol-file $executable $addr\""
# -L or else lx-symbols throws for arm:
# gdb.MemoryError: Cannot access memory at address 0xbf0040cc