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

Clash Royale CLAN TAG#URR8PPP
up vote
2
down vote
favorite
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)
kernel debugging
add a comment |Â
up vote
2
down vote
favorite
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)
kernel debugging
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
add a comment |Â
up vote
2
down vote
favorite
up vote
2
down vote
favorite
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)
kernel debugging
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)
kernel debugging
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
add a comment |Â
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
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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