mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
tc: create helper to access toolchain tools
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user