User Tools

Site Tools


mywiki:linux:linux_debugging_with_lauterbach

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
mywiki:linux:linux_debugging_with_lauterbach [2015/12/29 17:47] – [Load symbol from linux PC via networking] supermywiki:linux:linux_debugging_with_lauterbach [2019/09/15 18:55] (current) – external edit 127.0.0.1
Line 1: Line 1:
-**Linux Debugging with LauterBach**+**Linux Debugging**
  
-====== Basic requirement ======+^ Reference | {{:mywiki:linux:linux_debugging_techniques.ppt|}} | 
 + 
 +====== Linux Debugging with LauterBach ====== 
 + 
 +===== Basic requirement =====
  
 In order to support c source code level debugging, it is a must to enable debugging option during compile In order to support c source code level debugging, it is a must to enable debugging option during compile
  
  
-===== Get source code directory base =====+==== Get source code directory base ====
  
 <file C> <file C>
Line 16: Line 20:
     <bb2043>   DW_AT_comp_dir : (indirect string, offset: 0x171): /disk/fs1/tmp2/openwrt/core/kernel_tree     <bb2043>   DW_AT_comp_dir : (indirect string, offset: 0x171): /disk/fs1/tmp2/openwrt/core/kernel_tree
 </file> </file>
-===== Discover entry point in ELF ===== +==== Discover entry point in ELF ====
     * Discover vmlinux entry point     * Discover vmlinux entry point
 <file> <file>
Line 30: Line 34:
 Its output in my setup: **start address 0x6002df00** Its output in my setup: **start address 0x6002df00**
  
- +==== Generate system.map ====
- +
- +
- +
- +
-===== Generate system.map ===== +
 <file> <file>
     mips-openwrt-linux-nm -n vmlinux | grep -v '\( [aNUw] \)\|\(__crc_\)\|\( \$[adt]\)' > System.map     mips-openwrt-linux-nm -n vmlinux | grep -v '\( [aNUw] \)\|\(__crc_\)\|\( \$[adt]\)' > System.map
Line 45: Line 44:
 </file> </file>
  
-====== Lauterbach/Debugger ====== +===== Lauterbach/Debugger ===== 
  
-===== Load symbol from linux PC via networking =====+==== Load symbol from linux PC via networking ====
 Suppose below working environment: Suppose below working environment:
 | Linux Compilation folder via [[linux_debugging_with_lauterbach#get_source_code_directory_base|method]] | /disk/fs1/tmp2/shaoguoh/project/ugw61_grx500/openwrt/core/kernel_tree | | Linux Compilation folder via [[linux_debugging_with_lauterbach#get_source_code_directory_base|method]] | /disk/fs1/tmp2/shaoguoh/project/ugw61_grx500/openwrt/core/kernel_tree |
Line 73: Line 72:
  
 With this folder, now debugger can access this file via samba from windows With this folder, now debugger can access this file via samba from windows
 +
 +====== Linux Kernel Debugging Tools ======
 +===== Enable kernel debug to detection lock/context issue =====
 +In openwrt/core, run: make kernel_menuconfig
 +In kernel_hack, enable below items:
 +{{:mywiki:linux:kernel_hack.jpg|}}
  
  
mywiki/linux/linux_debugging_with_lauterbach.1451382469.txt.gz · Last modified: (external edit)