This repository was archived by the owner on Nov 8, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -85,15 +85,17 @@ command -v ${ADDR2LINE} >/dev/null 2>&1 || die "${ADDR2LINE} isn't installed"
85
85
# init/main.c! This only works for vmlinux. Otherwise it falls back to
86
86
# printing the absolute path.
87
87
find_dir_prefix () {
88
- local objfile=$1
89
-
90
88
local start_kernel_addr=$( echo " ${ELF_SYMS} " | sed ' s/\[.*\]//' |
91
89
${AWK} ' $8 == "start_kernel" {printf "0x%s", $2}' )
92
90
[[ -z $start_kernel_addr ]] && return
93
91
94
- local file_line= $( ${ADDR2LINE} -e $objfile $start_kernel_addr )
95
- [[ -z $file_line ]] && return
92
+ run_addr2line ${start_kernel_addr} " "
93
+ [[ -z $ADDR2LINE_OUT ]] && return
96
94
95
+ local file_line=${ADDR2LINE_OUT#* at }
96
+ if [[ -z $file_line ]] || [[ $file_line = $ADDR2LINE_OUT ]]; then
97
+ return
98
+ fi
97
99
local prefix=${file_line% init/ main.c:* }
98
100
if [[ -z $prefix ]] || [[ $prefix = $file_line ]]; then
99
101
return
@@ -350,7 +352,7 @@ echo "${ELF_SECHEADERS}" | ${GREP} -q '\.debug_info' || die "CONFIG_DEBUG_INFO n
350
352
init_addr2line $objfile
351
353
352
354
DIR_PREFIX=supercalifragilisticexpialidocious
353
- find_dir_prefix $objfile
355
+ find_dir_prefix
354
356
355
357
FIRST=1
356
358
while [[ $# -gt 0 ]]; do
You can’t perform that action at this time.
0 commit comments