-*- mode: text -*- Building and Using GDB Tracepoints for Linux The tracepoint support has two components: a loadable kernel module, and patches to GDB. Prerequisites The kernel module requires Linux 2.6.19.1, or newer. The GDB patches are relative to the CVS sources as of sometime around Feb 21, 2007. It seems that the Feb 27 weekly GDB snapshot works: ftp://sourceware.org/pub/gdb/snapshots/current/gdb-weekly-6.6.50.20070227.tar.bz2 Kernel Module To build the kernel module, type 'make' in the source directory (which also contains this INSTALL file). This should build you a file 'gtp.ko', which you can load with 'insmod gtp.ko' (as root). I semi-recommend installing Linus's 'sparse' checker and building with 'make C=1'; this does some pickier typechecking on your code, and even brings some kernel-specific knowledge into play, like checking that pointers to userspace objects are used properly. It's "semi- recommended" because it didn't actually catch any problems for me, but you never know; I'll take a static failure over a crash any day. More experienced kernel hackers have told me Xen makes things much more pleasant --- you don't have to crash the guest that's running your development tools. I haven't tried it yet because I didn't have time, but it's probably smart. I hate rebooting. GDB Patches The file 'gdb.patch' contains a patch for GDB that adds the 'linux-trace' target. To apply it, cd to the top level of the source tree, and use patch -p5. Then build GDB in the usual way. GDB is happy to be run straight out of its build tree, if you don't want to install it. I'll work on getting these patches into the public GDB sources, but it's not kludge-free, so it may not go quickly.