Linux Kernel: 4.13-RC7 x86_64de débogage du noyau: Gdb pas en mesure de définir des points d'arrêt et aucun effet de SIGINT pour ramener dans Debugging Session
Configuré Buildroot et Qemu pour le noyau Linux Debugging .
Lancement Qemu utilisant la commande suivante:
qemu-system-x86_64 -kernel linux-4.13-rc7/arch/x86/boot/bzImage -initrd buildroot-2017.02.5/output/images/rootfs.cpio -append "root=/dev/ram0 console=tty0 kgdboc=ttyS0,9600 kgdbwait" -chardev pty,id=pty -device isa-serial,chardev=pty
Maintenant, dans la fenêtre de terminal suivante, gdb de lancement et procéder suivantes commandes gdb:
`
gdb-peda$ file vmlinux
Reading symbols from vmlinux...done.
warning: File "/root/drive/linux-4.13-rc7/scripts/gdb/vmlinux-gdb.py" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
To enable execution of this file add
add-auto-load-safe-path /root/drive/linux-4.13-rc7/scripts/gdb/vmlinux-gdb.py
line to your configuration file "/root/.gdbinit".
To completely disable this security protection add
set auto-load safe-path/
line to your configuration file "/root/.gdbinit".
For more information about this security protection see the
"Auto-loading safe path" section in the GDB manual. E.g., run from the shell:
info "(gdb)Auto-loading safe path"
gdb-peda$ target remote /dev/pts/3
Remote debugging using /dev/pts/3
Warning: not running or target is remote
0xffffffffbd6f65af in ??()
gdb-peda$ b start_kernel
Breakpoint 1 at 0xffffffff81f79ad7: file init/main.c, line 510.
gdb-peda$ c
Continuing.
Warning:
Cannot insert breakpoint 1.
Cannot access memory at address 0xffffffff81f79ad7
Command aborted.
gdb-peda$ `
J'ai aussi essayé dans la machine Qemu:
echo "g" > /proc/sysrq-trigger
. Mais rien ne s'est passé .
Également, essayé de définir des points d'arrêt matériels en utilisant hbreak
sur start_kernel
, mais rien ne s'est produit.