deb-symbols - Linux


Overview

deb-symbols is a command-line tool specifically designed to extract debug symbols from Debian packages. These symbols are essential for debugging applications at a more granular level by linking them to source code files.

Syntax

deb-symbols [options] <package>...

Options/Flags

  • -v, –verbose: Print verbose output, providing more details during processing.
  • -l, –log-level: Specify the logging level (e.g., debug, info, error).
  • -d, –download-only: Download the debug symbols without performing extraction.
  • -e, –extraction-dir: Specify the directory to which the extracted symbols will be saved. Default: /usr/lib/debug/build
  • -p, –preserve-build-ids: Preserve the original Build-Ids in the extracted symbols.

Examples

Extract debug symbols for a specific package:

deb-symbols glibc-dbg

Extract symbols for multiple packages:

deb-symbols bash-dbg less-dbg

Extract symbols and save them to a custom directory:

deb-symbols -e /my/debug/symbols g++-dbg

Download symbols only (without extraction):

deb-symbols -d kernel-dbg

Common Issues

  • Missing debug symbols: Some packages may not have debug symbols available. Check the package description or contact the maintainer.
  • Extraction errors: If extraction fails, ensure that the gdb package is installed and that you have sufficient permissions.

Integration

deb-symbols can be used in conjunction with other tools:

  • gdb: Use the extracted symbols to debug applications with the gdb debugger.
  • build-essential: Install the build-essential package to enable compilation of debug symbols.

Related Commands

  • dpkg-deb: Manipulate Debian packages, including extraction and repackaging.
  • apt-file: Search for files within Debian packages.
  • readelf: Display detailed information about ELF files, including debug symbols.