0

I am debugging with Linux kernel LTS4.4 (arm32, cortexa7).

I already built successfully the kernel image as well as vmlinux.

I am using Debugger Lauterbach and Trace32 tool. And use below command to load vmlinux and kernel source

B:: data.load.Elf /home/compile-kernel/linux-4.4.138/vmlinux /PlusVM /STRIPPART 4 /PATH "/home/src-kernel"

enter image description here

The loading progress is successful, but I don't see any C code (HLL), only asm.

After that, I try to show symbol.list.source . However, the table List is empty.

Could you guys support me on this ! Thanks.

Thảo M. Hoàng
  • 1,224
  • 3
  • 20
  • 42
  • Are you sure that you've build the kernel with debug information? – Holger Nov 11 '18 at 19:02
  • Yes. To be able to do Linux aware debugging, the vmlinux file must be compiled with debug info enabled. Thus, need to ensure that CONFIG_DEBUG_INFO is enabled in the kernel configuration. Probably find this option under “Kernel hacking -> Compile the kernel with debug info” (in newer kernel versions under “Kernel hacking -> Compile-time checks and compiler options -> Compile the kernel with debug info”). Make sure that CONFIG_DEBUG_INFO_REDUCED is not set (Reduce debugging information). – Thảo M. Hoàng Nov 12 '18 at 04:58
  • Well, if sYmbol.List.SOURCE is showing you an empty window, you are probably still missing required debug information in your vmlinux file. A suitable vmlinux file should be about 10 times bigger the raw image file. In you screenshot TRACE32 is still loading the file (there is the orange progress bar a the bottom) Have you waited long enough? – Holger Nov 14 '18 at 12:49
  • Hi Holger, of course I have waited for the progress completed. I just took the picture randomly for example. – Thảo M. Hoàng Nov 15 '18 at 09:19
  • https://www.lauterbach.com/frames.html?manual.html – Thảo M. Hoàng Nov 15 '18 at 09:19
  • I have corrected STRIPPART to resolve the issue. This param indicates how many folder levels you must shift to reach the kernel-source. – Thảo M. Hoàng Nov 30 '18 at 04:39

1 Answers1

0

Load Kernel Symbols:

Step 1:

  • vmlinux

build/tmp/work/.../linux-kernel-standard-build/arch/arm/boot/vmlinux

  • kernel source

build/tmp/work/.../linux-kernel-standard-build/source

Step 2:

Data.LOAD.Elf /home/user/build/tmp/work/.../linux-kernel-standard-build/arch/arm/boot/vmlinux /NoCODE /STRIPPART "arch" /SOURCEPATH /home/user/build/tmp/work/.../linux-kernel-standard-build/source

Result:

enter image description here

Thảo M. Hoàng
  • 1,224
  • 3
  • 20
  • 42