Using systemtap with Debian sid.


I met the error in using systemtap with Debian sid.It was because kernel doesn't have debug symbols. So I was checking -dbg package of linux-kernel,but there was no -dbg package of i686 kernel in Debian sid.

Then I built the kernel package having debug symbols. I show how to make the kernel package applicable for system-tap below,

Step 1. aptitude install linux-source-2.6.32 kernel-package fakeroot

Step 2. cd /your/working/dir

Step 3. tar xf /usr/src/linux-source-2.6.32.tar.bz2

Step 4. cd linux-source-2.6.32

Step 5. cp /boot/config-2.6.32-your-arch-version .config

Step 6. vi .config, and add 'CONFIG_DEBUG_INFO=y' into .config.

Step 7. make oldconfig

Step 8. fakeroot make-kpkg -j <the total number of your cpu core> --append-to-version +debug --revision=<the revision number you prefer to. ex. 1> --initrd binary-arch

(ex. When you have 2 cores in your machine,and you prefer 1 for revision number,

you can type as below,

fakeroot make-kpkg -j 2 --append-to-version +debug --revision=1 --initrd binary-arch )

Step 9. cd ..

Step 10. sudo dpkg -i linux-image-2.6.32+debug_<rev>_i386.deb linux-headers-2.6.32+debug_<rev>_i386.deb

Step 11. reboot with linux-image-2.6.32+debug.

Step 12. try to stap command.

That's all. The system-tap commands worked fine.

トラックバック - http://d.hatena.ne.jp/nozzy123nozzy/20110212/1297519911
Connection: close