5

How can I debug Ubuntu's kernel? Are there any debug symbols available, or should I recompile the kernel with debug info?

Jorge Castro
  • 70,934
  • 124
  • 466
  • 653
qwe
  • 53
  • 1
  • 3

2 Answers2

4

The kernel team have a wonderful wiki page.

it has a kernel debugging page where you can find :

  • Debugging Scenarios
  • Debugging Guides
  • Debugging Tools/Information

To determine which guides are relevant to your problem see the Kernel/Debugging/Symptom based debugging guide .

hhlp
  • 41,392
  • 18
  • 84
  • 133
  • 1
    -1 , you don't actually answer the question "Are there any debug symbols available, or should I recompile the kernel with debug info?". Which of the guides on the [wiki page](https://wiki.ubuntu.com/KernelTeam) is for generic Kernel debugging with common tools like `perf`? – Stefan Lasiewski Sep 20 '12 at 22:06
2

Useful information can be found on this page

https://wiki.ubuntu.com/Kernel/Systemtap

Specifically

sudo tee /etc/apt/sources.list.d/ddebs.list << EOF
deb http://ddebs.ubuntu.com/ precise          main restricted universe multiverse
deb http://ddebs.ubuntu.com/ precise-security main restricted universe multiverse
deb http://ddebs.ubuntu.com/ precise-updates  main restricted universe multiverse
deb http://ddebs.ubuntu.com/ precise-proposed main restricted universe multiverse
EOF

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys ECDCAD72428D7C01
sudo apt-get update
sudo apt-get install linux-image-$(uname -r)-dbgsym

Now I just need to figure out the Debian equivalent.

Bryan Hunt
  • 121
  • 2