1

Given the address (e.g. c03a9a4c) of an instruction in vmlinux file and the vmlinux file, how to figure out the corresponding line number in the source code. I don't want to figure it out manually.

[ 24.358093] C0 [ kworker/0:2] [c03a9a4c] (dbs_check_cpu+0x324/0x340) from [c03a9edc] (do_dbs_timer+0x54/0xf4)

Is these any tool to which we pass the address (c03a9a4c) and the vmlinux file and the tool gives the line number and the .c file name as output.

YBlore
  • 83
  • 1
  • 5
  • A kernel debugger would be your friend. But otherwise that's not so easy, because the address of some piece of code is not fixed and can be different each time the application starts. Maybe that's not the case for the kernel, but I don't know any automated solution to this problem. Hint: `dbs_check_cpu+0x324` means 0x324 bytes into function dbs_check_cpu. – PMF Nov 20 '13 at 17:20
  • The tools like `addr2line` and `eu-addr2line` can help. See the answers to this question: http://stackoverflow.com/questions/6151538/addr2line-on-kernel-module – Eugene Nov 21 '13 at 08:21

0 Answers0