mywiki:linux:linux_debugging_with_lauterbach
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| mywiki:linux:linux_debugging_with_lauterbach [2015/12/29 17:38] – [Load System via networking] super | mywiki:linux:linux_debugging_with_lauterbach [2019/09/15 18:55] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | **Linux Debugging | + | **Linux Debugging** |
| - | ====== Basic requirement | + | ^ Reference | {{: |
| + | |||
| + | ====== 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 ==== |
| - | < | + | < |
| mips-openwrt-linux-objdump -g vmlinux | grep -i DW_AT_comp_dir | grep -i indirect | grep ' | mips-openwrt-linux-objdump -g vmlinux | grep -i DW_AT_comp_dir | grep -i indirect | grep ' | ||
| </ | </ | ||
| Line 16: | Line 20: | ||
| < | < | ||
| </ | </ | ||
| - | ===== Discover entry point in ELF ===== | + | ==== Discover entry point in ELF ==== |
| * Discover vmlinux entry point | * Discover vmlinux entry point | ||
| < | < | ||
| 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 | + | |
| < | < | ||
| mips-openwrt-linux-nm -n vmlinux | grep -v '\( [aNUw] \)\|\(__crc_\)\|\( \$[adt]\)' | mips-openwrt-linux-nm -n vmlinux | grep -v '\( [aNUw] \)\|\(__crc_\)\|\( \$[adt]\)' | ||
| Line 45: | Line 44: | ||
| </ | </ | ||
| - | ====== Lauterbach/ | + | ===== Lauterbach/ |
| - | ===== Load System | + | ==== Load symbol from linux PC via networking ==== |
| Suppose below working environment: | Suppose below working environment: | ||
| - | | Linux Compilation folder | / | + | | Linux Compilation folder |
| | vmlinux folder | / | | vmlinux folder | / | ||
| | samba mapping folder to windows | X: | | samba mapping folder to windows | X: | ||
| Line 55: | Line 54: | ||
| Lauterbach command: | Lauterbach command: | ||
| < | < | ||
| - | d.load.elf X: | + | d.load.elf |
| </ | </ | ||
| Line 63: | Line 62: | ||
| * /nocode: don't load code, but symbol only | * /nocode: don't load code, but symbol only | ||
| - | Example: | + | **Example**: |
| - | If there is one file name in vmlinux: | + | If the location of one file in vmlinux |
| / | / | ||
| - | After /strippart "/ | + | After /strippart "/ |
| shaoguoh/ | shaoguoh/ | ||
| - | After /path " | + | After /path " |
| X: | X: | ||
| + | |||
| + | With this folder, now debugger can access this file via samba from windows | ||
| + | |||
| + | ====== Linux Kernel Debugging Tools ====== | ||
| + | ===== Enable kernel debug to detection lock/ | ||
| + | In openwrt/ | ||
| + | In kernel_hack, | ||
| + | {{: | ||
mywiki/linux/linux_debugging_with_lauterbach.1451381933.txt.gz · Last modified: (external edit)
