drgn – programmable debugger

drgn is a programmable debugger designed to make complex debugging and system introspection tasks easier to express through scripts.

Originally developed for Linux kernel debugging, drgn exposes program types, variables and memory as objects that can be examined and manipulated through Python. Rather than requiring developers to translate every investigation into traditional debugger commands, it allows them to write scripts that navigate the structures and relationships within a running system.

This approach is particularly useful when investigating large, interconnected data structures in the Linux kernel. drgn can also examine userspace programs and serves as a library for building specialised debugging and diagnostic tools.

This is free and open source software.

Key Features

  • Exposes program types, variables and memory through a programmable interface for debugging and introspection.
  • Inspect a running Linux kernel to investigate its internal structures and current state.
  • Analyse kernel crash dumps to examine the circumstances surrounding system failures.
  • Attach to live userspace processes and investigate supported native applications.
  • Examine userspace core dumps without needing to reproduce the original program failure.
  • Navigate pointers, arrays, structures and other typed objects using natural expressions.
  • Provides helper functions for inspecting common Linux kernel data structures and subsystems.
  • Supports scripting tasks that traverse linked lists, examine kernel objects and filter information according to selected conditions.
  • Can be embedded as a library within custom debugging, monitoring and introspection utilities.
  • Supports symbolic debugging information to relate memory contents to program types and variables.
  • Can be used interactively for exploratory debugging or through scripts that automate repeatable investigations.
  • Provides an alternative workflow to conventional command-oriented debugging tools for complex system analysis.

Website: github.com/osandov/drgn
Support:
Developer: Omar Sandoval
License: GNU Lesser General Public License v2.1

drgn help

drgn is written in Python and C. Learn Python with our recommended free books and free tutorials. Learn C with our recommended free books and free tutorials.


Related Software

Debuggers
LLDBNext generation, high-performance debugger
GhidraSoftware reverse engineering framework
DelveSource level debugger for the Go programming language
GDBThe GNU Debugger
ValgrindA memory debugger and profiler
Radare2Portable reversing framework
BugStalkerRust debugger
XdebugExtension for PHP to aid debugging and development
SeerGUI frontend to GDB
iaitoGraphical interface for radare2
KDbgGraphical user interface to GDB
straceDiagnostic, debugging and instructional userspace utility
rrRecord-and-replay debugger
gfLightweight GDB interface with source, stack and memory views
drgnProgrammable debugger that puts scripting at the centre
cgdbLightweight console frontend to the GNU debugger
PuDBConsole-based visual debugger for Python
nndPartially inspired by RemedyBG
bashdbSource-code debugger for bash; follows the GDB command syntax
PINCEMemory scanning, process manipulation and reverse engineering
edbLow-level debugging with disassembly and register inspection
SysprofProfile an application or entire system
crashLinux kernel crash analysis utility

Read our verdict in the software roundup.


Best Free and Open Source Software LinuxLinks helps you discover the best free and open source software for Linux. Explore our extensive collection of recommended applications, including alternatives to popular proprietary software.

We also publish software reviews, Linux tutorials, hardware reviews, free programming books and articles covering the wider open source community. Browse our Linux resources to discover more.

Know a useful free and open source Linux application we haven't covered? Suggest a program for inclusion.

Has your software been featured on LinuxLinks? Display one of our Featured on LinuxLinks badges on your website or GitHub README.
Subscribe

Please read our Comment Policy before commenting.

Notify of
guest
0 Comments
Oldest
Newest Most Voted