Dynamic debug is useful for debug driver, and can be enable by:
1. Mount debug fs
#>mount -t debugfs none /sys/kernel/debug
2. Enable dynamic debug for specifiy funcition
echo 'file virtio_pci_modern.c +p' > /sys/kernel/debug/dynamic_debug/control
However somtimes we need to debug built-in driver and need enable dynamic debug at boot time. then we can enable by passing dyndbg to Kernel command line like
dyndbg="'file virtio_pci_modern.c +p"
with QEMU we can use -append to attach dyndbg
qemu-system-arm -kernel kernel-qemu -cpu arm1176 -m 256 -append "dyndbg="file virtio_pci_modern.c +p""
沒有留言:
張貼留言