Please note that User Registration has been temporarily disabled due to a recent increase in automated registrations. If anyone needs an account, please request one here: RequestAccount. Thanks for your patience!--Wmat (talk)
Please email User:Wmat if you experience any issues with the Request Account form.

Difference between revisions of "Find a kernel function line"

From eLinux.org
Jump to: navigation, search
m
 
Line 12: Line 12:
 
  msm_adsp_disable
 
  msm_adsp_disable
 
  /home/gnutoo/embedded/htcdream/SHR/kernel/linux/sound/soc/msm/adsp.c:1033
 
  /home/gnutoo/embedded/htcdream/SHR/kernel/linux/sound/soc/msm/adsp.c:1033
 +
 +
[[Category:Tips and Tricks]]

Latest revision as of 09:54, 27 October 2011

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

notice the c029ff68,we will use it with addr2line:

# arm-none-linux-gnueabi-addr2line -f -e vmlinux c029ff68 
msm_adsp_disable
/home/gnutoo/embedded/htcdream/SHR/kernel/linux/sound/soc/msm/adsp.c:1033