Saturday, September 14, 2013
Friday, September 13, 2013
short notes using KGDB on X86
Using kgdb, kdb and the kernel debugger internals
Using kgdb and the kgdb Internals
1.) Configure, Compile and Load the kernel
CONFIG_KGDB=y
CONFIG_KGDB_SERIAL_CONSOLE=y
2.) Check the /pro/cmdline
bash-3.2# cat /proc/cmdline
rw root=/dev/ram0 ide_generic.probe_mask=0x0 kgdboc=ttyS0,9600,B
3.) Check sysfs
bash-3.2# cat /sys/module/kgdboc/parameters/kgdboc
ttyS0,9600,B
4.) Trigger the kernel to kgdb
bash-3.2# echo g > /proc/sysrq-trigger
[ 489.043906] SysRq : GDB
5.) gdb vmlinux
(gdb) target remote 10.193.65.8:2051
Remote debugging using 10.193.65.8:2051
Do what you want from here.
Enjoy debugging.......
Using kgdb and the kgdb Internals
1.) Configure, Compile and Load the kernel
CONFIG_KGDB=y
CONFIG_KGDB_SERIAL_CONSOLE=y
2.) Check the /pro/cmdline
bash-3.2# cat /proc/cmdline
rw root=/dev/ram0 ide_generic.probe_mask=0x0 kgdboc=ttyS0,9600,B
3.) Check sysfs
bash-3.2# cat /sys/module/kgdboc/parameters/kgdboc
ttyS0,9600,B
4.) Trigger the kernel to kgdb
bash-3.2# echo g > /proc/sysrq-trigger
[ 489.043906] SysRq : GDB
5.) gdb vmlinux
(gdb) target remote 10.193.65.8:2051
Remote debugging using 10.193.65.8:2051
Do what you want from here.
Enjoy debugging.......
Subscribe to:
Posts (Atom)