lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <4f2c24f2-fc96-eaf7-16c0-04ae7e9f825c@163.com>
Date:   Mon, 5 Jul 2021 16:34:00 +0800
From:   qianfan <qianfanguijin@....com>
To:     linux-kernel@...r.kernel.org
Subject: how to debug linux kernel by JLink

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



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ