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.

1
  • 1
    Compile it yourself. Commented Jul 8, 2018 at 20:32

1 Answer 1

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.

1
  • The provided guide does not work because rules does not have the recipies used by the tutorial. Commented Sep 4, 2018 at 15:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .