Skip to content

Instantly share code, notes, and snippets.

@cantremember
Last active April 2, 2022 13:28
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save cantremember/42ec76fdd425a798a8f69b45a8068880 to your computer and use it in GitHub Desktop.
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment