Find a kernel function line

From eLinux.org
Revision as of 21:09, 22 May 2010 by GNUtoo (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Introduction

Often in dmesg messages you have function names,for instance:

[   71.030609] msm_adsp_disable() 'AUDPREPROCTASK'

In order to get the line number and source file path do:

# grep msm_adsp_disable System.map 
c029ff0c t msm_adsp_disable_locked
c029ff68 T msm_adsp_disable
c047fe98 r __ksymtab_msm_adsp_disable
c049030e r __kstrtab_msm_adsp_disable
# addr2line -f -e vmlinux c029ff68 
msm_adsp_disable
/home/gnutoo/embedded/htcdream/SHR/kernel/linux/sound/soc/msm/adsp.c:1033