Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 7503

Troubleshooting • Could not stop at breakpoints with gdb and Rpi 4

$
0
0
Kernel : Linux raspberrypi4-64 6.6.22-v8

I tried debugging LInux with KGDB, I managed to configure kgdb in the kernel configs:

Symbol: STRICT_KERNEL_RWX [=n]

Code:

 --- KGDB: kernel debugger                                                  │ │    │ │     [*]   KGDB: use kprobe blocklist to prohibit unsafe breakpoints            │ │    │ │     <*>   KGDB: use kgdb over the serial console                               │ │    │ │     [ ]   KGDB: internal test suite                                            │ │    │ │     [*]   KGDB_KDB: include kdb frontend for kgdb                              │ │    │ │     (0x1)   KDB: Select kdb command functions to be enabled by default         │ │    │ │     [*]     KGDB_KDB: keyboard as input device                                 │ │    │ │     (0)     KDB: continue after catastrophic errors 
Trigger kgdb :

Code:

[Target] echo ttyS0,115200 > /sys/module/kgdboc/parameters/kgdboc [Target] echo g >/proc/sysrq-trigger
connect via toolchain's gdb :

Code:

<path>/aarch64-poky-linux-gdb vmlinuxset baud rate 115200target remote /dev/ttyUSB0
Now I try to set a breakpoint :

Code:

b sys_sync           # cannot find this is the symbol fileb ksys_sync                    # could find this one, but could not break in itc
I connected to the board via ssh, but could not break into ksys_sync after running the sync command. I have tried breaking into many other functions but gdb could not stop at those breakpoints.

Statistics: Posted by sof — Wed May 14, 2025 6:28 pm — Replies 0 — Views 41



Viewing all articles
Browse latest Browse all 7503

Trending Articles