* how to debug linux kernel by JLink
@ 2021-07-05 8:34 qianfan
0 siblings, 0 replies; only message in thread
From: qianfan @ 2021-07-05 8:34 UTC (permalink / raw)
To: linux-kernel
Hi:
I'm reading linux kernel source code and try debugging linux by using
JLink. I had developed env on my bananapi-m2u and can connected it in gdb.
I add some breakpoints in gdb and seems only code before thread ready
can hit: (next is the log)
(gdb) i b
Num Type Disp Enb Address What
1 breakpoint keep y 0xc0b00940 in start_kernel at
init/main.c:877
2 breakpoint keep y 0xc07f7a30 in kernel_init at
init/main.c:1441
3 breakpoint keep y 0xc0690ce4 in of_platform_populate at
drivers/of/platform.c:472
4 breakpoint keep y 0xc0603234 in mv64xxx_i2c_probe at
drivers/i2c/busses/i2c-mv64xxx.c:935
(gdb) c
Continuing.
Breakpoint 1, start_kernel () at init/main.c:877
877 {
(gdb) c
Continuing.
Breakpoint 2, kernel_init (unused=0x0) at init/main.c:1441
1441 {
(gdb) bt
#0 kernel_init (unused=0x0) at init/main.c:1441
#1 0xc0100150 in ret_from_fork () at arch/arm/kernel/entry-common.S:158
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) c
Continuing.
breakpoints start_kernel and kernel_init hited, but of_platform_populate
and device probe functions doesn't.
Is it a good way debugging linux kernel by using hardware debug tools?
Thanks
qianfan
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-07-05 8:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-05 8:34 how to debug linux kernel by JLink qianfan
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.