#!/bin/sh # Script to install debugging symbols for the current kernel # See https://wiki.ubuntu.com/DebuggingProgramCrash if ! test -f /etc/apt/sources.list.d/ddebs.list then # Add the ddeb repository 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 deb http://ddebs.ubuntu.com $(lsb_release -cs)-security main restricted universe multiverse 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 428D7C01 sudo apt-get update fi # Now install the debugging symbols for the package in question if ! sudo apt-get install linux-image-$(uname -r)-dbgsym then echo Your kernel may be out of date. Try installing an updated one with the command echo sudo apt-get dist-upgrade echo then reboot and try this script again. exit 1 fi # And the headers, else systemtap won't be able to compile modules sudo apt-get install linux-headers-$(uname -r)