提交 3b2c37aa 编写于 作者: Z zhangdengyu

fixed f924cc77 from https://gitee.com/zhangdengyu/kernel_liteos_a/pulls/1129

fix:修复内核调用栈解析脚本bug

方案描述:
1、修复内核调用栈解析脚本parse_mem_info.sh的bug,将多余符号(`)去除

BREAKING CHANGE:
无

Close:#I6I6BA
Signed-off-by: Nzhangdengyu <zhangdengyu2@huawei.com>
Change-Id: I0b0d7e5f6e79313e5f517f89395f4195883cfe06
上级 f7dbd27a
...@@ -38,7 +38,7 @@ get_line() ...@@ -38,7 +38,7 @@ get_line()
{ {
SYM_ADDR=$(echo $1 | awk '{print $2}') SYM_ADDR=$(echo $1 | awk '{print $2}')
ELF_OFFSET=$(echo ${SYM_ADDR} | cut -d '[' -f2 | cut -d ']' -f1) ELF_OFFSET=$(echo ${SYM_ADDR} | cut -d '[' -f2 | cut -d ']' -f1)
FILE_LINE=$(${ADDR2LINE} -f -e $2 ${ELF_OFFSET} | awk 'NR==2'`) FILE_LINE=$(${ADDR2LINE} -f -e $2 ${ELF_OFFSET} | awk 'NR==2')
if [[ "${FILE_LINE}" == *"?"* ]]; then if [[ "${FILE_LINE}" == *"?"* ]]; then
typeset ELF_OFFSET=$((ELF_OFFSET+LOAD_BASE)) typeset ELF_OFFSET=$((ELF_OFFSET+LOAD_BASE))
ELF_OFFSET=$(echo "obase=16;${ELF_OFFSET}" | bc) ELF_OFFSET=$(echo "obase=16;${ELF_OFFSET}" | bc)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册