从一个文件里读取出每一行,并解析每一行
#!/bin/bash callstack_file=${1} cat ${callstack_file} | while read line do entry=`echo ${line} | grep entry -w` if [ -n "${entry}" ] then address=`echo ${entry} | grep entry -w | awk '{print $2}'` ${UBOOT_TOOLCHAIN}/aarch64-linux-gnu-addr2line -aCfe ./u-boot ${address} fi done