Not able to see the Linux kernel debug info after building kernel in debug mode

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
2
down vote

favorite
2












I tried to build Linux Kernel versions 3.10.107 and 4.13.8 in debug mode.
I have used following steps to build the kernel.



Host machine with Ubuntu 16.04 OS and trying to update its kernel to latest version(4.13.8) with debug info.



Get the latest kernel source code



wget https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.13.8.tar.xz
mkdir linux-4.13.8 && tar xvf linux-4.13.8.tar.xz -C $(pwd)/linux-4.13.8/
cd linux-4.13.8


Copy .config from the host linux



cp /boot/config-`uname -r`* .config


Below options are enabled to build kernel in debug mode



gedit .config
CONFIG_DEBUG_KERNEL=y
CONFIG_FRAME_POINTER=y
CONFIG_KGDB=y
CONFIG_KGDB_SERIAL_CONSOLE=y
CONFIG_DEBUG_INFO=y


Verified a gui menu of menuconfig



make menuconfig


Inside the Kernel hacking option, (kernel debugging, compile the kernel debug info, Printk options) are enabled and default debug message and console level is 7.



Executed the make command. kernel builds successfully.



make -j4



Installing the kernel



sudo make modules_install install 


Updated the Grub2



sudo update-grub2


Reboot the OS



reboot


OS updated with the latest Kernel 4.13.8 and works well, but debug info and printk outputs are not seen in dmesg console output and log files like(var/log/kern.log, dmesg, syslog)



I have also tried to debug the kernel image with gdb and it show (no debugging symbols found)



Please help to debug kernel. My intention is to debug and analyse system calls,traps, user space to kernel space switching, memory management in detail.
(Expected more debug information than with strace output)







share|improve this question






















  • Please show us the exact steps you followed. As a short starting point, maybe this will help : elinux.org/Debugging_The_Linux_Kernel_Using_Gdb
    – schaiba
    Oct 30 '17 at 9:19














up vote
2
down vote

favorite
2












I tried to build Linux Kernel versions 3.10.107 and 4.13.8 in debug mode.
I have used following steps to build the kernel.



Host machine with Ubuntu 16.04 OS and trying to update its kernel to latest version(4.13.8) with debug info.



Get the latest kernel source code



wget https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.13.8.tar.xz
mkdir linux-4.13.8 && tar xvf linux-4.13.8.tar.xz -C $(pwd)/linux-4.13.8/
cd linux-4.13.8


Copy .config from the host linux



cp /boot/config-`uname -r`* .config


Below options are enabled to build kernel in debug mode



gedit .config
CONFIG_DEBUG_KERNEL=y
CONFIG_FRAME_POINTER=y
CONFIG_KGDB=y
CONFIG_KGDB_SERIAL_CONSOLE=y
CONFIG_DEBUG_INFO=y


Verified a gui menu of menuconfig



make menuconfig


Inside the Kernel hacking option, (kernel debugging, compile the kernel debug info, Printk options) are enabled and default debug message and console level is 7.



Executed the make command. kernel builds successfully.



make -j4



Installing the kernel



sudo make modules_install install 


Updated the Grub2



sudo update-grub2


Reboot the OS



reboot


OS updated with the latest Kernel 4.13.8 and works well, but debug info and printk outputs are not seen in dmesg console output and log files like(var/log/kern.log, dmesg, syslog)



I have also tried to debug the kernel image with gdb and it show (no debugging symbols found)



Please help to debug kernel. My intention is to debug and analyse system calls,traps, user space to kernel space switching, memory management in detail.
(Expected more debug information than with strace output)







share|improve this question






















  • Please show us the exact steps you followed. As a short starting point, maybe this will help : elinux.org/Debugging_The_Linux_Kernel_Using_Gdb
    – schaiba
    Oct 30 '17 at 9:19












up vote
2
down vote

favorite
2









up vote
2
down vote

favorite
2






2





I tried to build Linux Kernel versions 3.10.107 and 4.13.8 in debug mode.
I have used following steps to build the kernel.



Host machine with Ubuntu 16.04 OS and trying to update its kernel to latest version(4.13.8) with debug info.



Get the latest kernel source code



wget https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.13.8.tar.xz
mkdir linux-4.13.8 && tar xvf linux-4.13.8.tar.xz -C $(pwd)/linux-4.13.8/
cd linux-4.13.8


Copy .config from the host linux



cp /boot/config-`uname -r`* .config


Below options are enabled to build kernel in debug mode



gedit .config
CONFIG_DEBUG_KERNEL=y
CONFIG_FRAME_POINTER=y
CONFIG_KGDB=y
CONFIG_KGDB_SERIAL_CONSOLE=y
CONFIG_DEBUG_INFO=y


Verified a gui menu of menuconfig



make menuconfig


Inside the Kernel hacking option, (kernel debugging, compile the kernel debug info, Printk options) are enabled and default debug message and console level is 7.



Executed the make command. kernel builds successfully.



make -j4



Installing the kernel



sudo make modules_install install 


Updated the Grub2



sudo update-grub2


Reboot the OS



reboot


OS updated with the latest Kernel 4.13.8 and works well, but debug info and printk outputs are not seen in dmesg console output and log files like(var/log/kern.log, dmesg, syslog)



I have also tried to debug the kernel image with gdb and it show (no debugging symbols found)



Please help to debug kernel. My intention is to debug and analyse system calls,traps, user space to kernel space switching, memory management in detail.
(Expected more debug information than with strace output)







share|improve this question














I tried to build Linux Kernel versions 3.10.107 and 4.13.8 in debug mode.
I have used following steps to build the kernel.



Host machine with Ubuntu 16.04 OS and trying to update its kernel to latest version(4.13.8) with debug info.



Get the latest kernel source code



wget https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.13.8.tar.xz
mkdir linux-4.13.8 && tar xvf linux-4.13.8.tar.xz -C $(pwd)/linux-4.13.8/
cd linux-4.13.8


Copy .config from the host linux



cp /boot/config-`uname -r`* .config


Below options are enabled to build kernel in debug mode



gedit .config
CONFIG_DEBUG_KERNEL=y
CONFIG_FRAME_POINTER=y
CONFIG_KGDB=y
CONFIG_KGDB_SERIAL_CONSOLE=y
CONFIG_DEBUG_INFO=y


Verified a gui menu of menuconfig



make menuconfig


Inside the Kernel hacking option, (kernel debugging, compile the kernel debug info, Printk options) are enabled and default debug message and console level is 7.



Executed the make command. kernel builds successfully.



make -j4



Installing the kernel



sudo make modules_install install 


Updated the Grub2



sudo update-grub2


Reboot the OS



reboot


OS updated with the latest Kernel 4.13.8 and works well, but debug info and printk outputs are not seen in dmesg console output and log files like(var/log/kern.log, dmesg, syslog)



I have also tried to debug the kernel image with gdb and it show (no debugging symbols found)



Please help to debug kernel. My intention is to debug and analyse system calls,traps, user space to kernel space switching, memory management in detail.
(Expected more debug information than with strace output)









share|improve this question













share|improve this question




share|improve this question








edited Oct 30 '17 at 10:20

























asked Oct 30 '17 at 9:12









Neil Thomas

112




112











  • Please show us the exact steps you followed. As a short starting point, maybe this will help : elinux.org/Debugging_The_Linux_Kernel_Using_Gdb
    – schaiba
    Oct 30 '17 at 9:19
















  • Please show us the exact steps you followed. As a short starting point, maybe this will help : elinux.org/Debugging_The_Linux_Kernel_Using_Gdb
    – schaiba
    Oct 30 '17 at 9:19















Please show us the exact steps you followed. As a short starting point, maybe this will help : elinux.org/Debugging_The_Linux_Kernel_Using_Gdb
– schaiba
Oct 30 '17 at 9:19




Please show us the exact steps you followed. As a short starting point, maybe this will help : elinux.org/Debugging_The_Linux_Kernel_Using_Gdb
– schaiba
Oct 30 '17 at 9:19















active

oldest

votes











Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f401373%2fnot-able-to-see-the-linux-kernel-debug-info-after-building-kernel-in-debug-mode%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f401373%2fnot-able-to-see-the-linux-kernel-debug-info-after-building-kernel-in-debug-mode%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

Peggy Mitchell

The Forum (Inglewood, California)

Palaiologos