|
Quickstart
Update in 2012-05-10 UbuntuPreparatory work before use KGTPhttp://code.google.com/p/kgtp/wiki/HOWTO#Preparatory_work_before_use_KGTP Use KGTP
sudo mount -t sysfs none /sys/ sudo mount -t debugfs none /sys/kernel/debug/ cd kgtp sudo insmod gtp.ko sudo gdb-release /usr/lib/debug/boot/vmlinux-$(uname -r) (gdb) target remote /sys/kernel/debug/gtp (gdb) trace vfs_readdir
Tracepoint 1 at 0xc02289f0: file /build/buildd/linux-2.6.35/fs/readdir.c, line 23.
(gdb) actions
Enter actions for tracepoint 1, one per line.
End with a line saying just "end".
>collect $reg
>end
(gdb) tstart
(gdb) shell ls
vmlinux-2.6.35-30-generic
(gdb) tstop
(gdb) tfind
Found trace frame 0, tracepoint 1
#0 vfs_readdir (file=0x0, filler=0x163d8ae3, buf=0x18c0) at /build/buildd/linux-2.6.35/fs/readdir.c:23
23 {EndNow, you can begin to rock and roll your Linux kernel with KGTP and GDB. FedoraPreparatory work before use KGTPhttp://code.google.com/p/kgtp/wiki/HOWTO#Preparatory_work_before_use_KGTP Use KGTP
sudo mount -t sysfs none /sys/ sudo mount -t debugfs none /sys/kernel/debug/ cd kgtp sudo insmod gtp.ko sudo gdb-release /usr/lib/debug/lib/modules/$(uname -r)/vmlinux (gdb) target remote /sys/kernel/debug/gtp (gdb) trace vfs_readdir
Tracepoint 1 at 0xffffffff8110ec9b: file fs/readdir.c, line 23.
(gdb) actions
Enter actions for tracepoint 1, one per line.
End with a line saying just "end".
>collect $reg
>end
(gdb) tstart
(gdb) shell ls
co.patch getframe getmod.c gtp.mod.c gtp.txt perf_event.c
dkms.conf getframe.c getmod.py gtp.mod.o Makefile ring_buffer.c
dkms_others_install.sh getgtprsp.pl gtp.c gtp.o modules.order ring_buffer.h
dkms_others_uninstall.sh getmod gtp.ko gtp.patch Module.symvers
(gdb) tstop
(gdb) tfind
Found trace frame 0, tracepoint 1
#0 vfs_readdir (file=0xffff880019d3df00, filler=0xffffffff8110eb16 <filldir>, buf=0xffff880003b39f38)
at fs/readdir.c:23
23 {EndNow, you can begin to rock and roll your Linux kernel with KGTP and GDB. |
► Sign in to add a comment