2

My system is Ubuntu 18.04. How do I install a Linux kernel with debug symbols and without optimizations? I would like to trace it with SystemTap.

mrflash818
  • 305
  • 3
  • 11
Logic
  • 163
  • 5

1 Answers1

0

Ubuntu provides per-compiled kernels but these kernels won't have any debugging features you need. Here's a link to a quick guide to compiling the Ubuntu release of Linux.

There's a section for enabling debug symbols at the bottom of the guide.

Regarding the compiling of the kernel without optimization -- that can be done for certain features within the kernel, but the kernel as a whole requires the -O2 flag to compile. See discussion here.

nabulator
  • 163
  • 1
  • 8