Created
June 19, 2014 14:40
-
-
Save Embedded-linux/3b3177cc2825de6857c2 to your computer and use it in GitHub Desktop.
Kernel debug-objdump
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Debugging Linux kernel using "objdump" | |
To create objdump file include source and symbol address and line numbers. | |
/home/satishg/gcc/arm-2010q1/bin/arm-none-linux-gnueabi-objdump -l -S -d vmlinux > vmlinux.asm | |
Use System.map file to find base address of function "am3517_evm_init" | |
cat System.map | grep -n am3517_evm_init | |
38140:c0623668 t am3517_evm_init | |
38140 is line number in System.map. | |
c0623668 is the address of function am3517_evm_init. | |
Using this address(c0623668), search in vmlinux.asm file, with following command | |
vim vmlinux.asm | grep -n c0623668 | |
c0623668 <am3517_evm_init>: | |
am3517_evm_init(): | |
/home/satishg/qemu/linux-3.2/arch/arm/mach-omap2/board-am3517evm.c:459 | |
static struct omap_board_config_kernel am3517_evm_config[] __initdata = { | |
}; | |
static void __init am3517_evm_init(void) | |
{ | |
c0623668: e92d4070 push {r4, r5, r6, lr} | |
/home/satishg/qemu/linux-3.2/arch/arm/mach-omap2/board-am3517evm.c:461 | |
omap_board_config = am3517_evm_config; | |
omap_board_config_size = ARRAY_SIZE(am3517_evm_config); | |
c062366c: e3a04000 mov r4, #0 | |
c0623670: e59f21a4 ldr r2, [pc, #420] ; c062381c <am3517_evm_init+0x1b4> | |
/home/satishg/qemu/linux-3.2/arch/arm/mach-omap2/board-am3517evm.c:460 | |
static struct omap_board_config_kernel am3517_evm_config[] __initdata = { | |
}; | |
static void __init am3517_evm_init(void) | |
{ | |
omap_board_config = am3517_evm_config; | |
c0623674: e59f61a4 ldr r6, [pc, #420] ; c0623820 <am3517_evm_init+0x1b8> | |
c0623678: e59f51a4 ldr r5, [pc, #420] ; c0623824 <am3517_evm_init+0x1bc> | |
/home/satishg/qemu/linux-3.2/arch/arm/mach-omap2/board-am3517evm.c:462 | |
omap_board_config_size = ARRAY_SIZE(am3517_evm_config); | |
omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); | |
c062367c: e3a01004 mov r1, #4 | |
/home/satishg/qemu/linux-3.2/arch/arm/mach-omap2/board-am3517evm.c:460 | |
static struct omap_board_config_kernel am3517_evm_config[] __initdata = { | |
}; | |
static void __init am3517_evm_init(void) | |
{ | |
omap_board_config = am3517_evm_config; | |
c0623680: e5865000 str r5, [r6] | |
/home/satishg/qemu/linux-3.2/arch/arm/mach-omap2/board-am3517evm.c:461 | |
omap_board_config_size = ARRAY_SIZE(am3517_evm_config); | |
c0623684: e5824000 str r4, [r2] | |
/home/satishg/qemu/linux-3.2/arch/arm/mach-omap2/board-am3517evm.c:462 | |
omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); | |
c0623688: e1a00005 mov r0, r5 | |
c062368c: ebffe9e6 bl c061de2c <omap3_mux_init> | |
am3517_evm_i2c_init(): | |
.............................................. | |
.............................................. | |
.............................................. | |
.............................................. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment