Skip to content

Instantly share code, notes, and snippets.

@cantremember
Last active August 2, 2025 14:44
Show Gist options
  • Select an option

  • Save cantremember/42ec76fdd425a798a8f69b45a8068880 to your computer and use it in GitHub Desktop.

Select an option

Save cantremember/42ec76fdd425a798a8f69b45a8068880 to your computer and use it in GitHub Desktop.
Installing debug symbols for the Linux Kernel
#!/bin/bash
#
# https://askubuntu.com/questions/197016/how-to-install-a-package-that-contains-ubuntu-kernel-debug-symbols
# https://wiki.ubuntu.com/DebuggingProgramCrash#Debug_Symbol_Packages
echo "deb http://ddebs.ubuntu.com $(lsb_release -cs) main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ddebs.list
echo "deb http://ddebs.ubuntu.com $(lsb_release -cs)-updates main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ddebs.list
echo "deb http://ddebs.ubuntu.com $(lsb_release -cs)-proposed main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ddebs.list
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys ECDCAD72428D7C01
sudo apt-get update
# "This is rather huge (>680MB), so prepare for a wait"
sudo apt-get install -y linux-image-`uname -r`-dbgsym
# "automatically build debug symbol ddeb packages"
# for any subsequent Kernel builds / installs
sudo apt-get install -y pkg-create-dbgsym
sudo apt-get install gdb
@keefeho
Copy link

keefeho commented Aug 2, 2025

awesome!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment