Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
354 commits
Select commit Hold shift + click to select a range
284bd5f
docs: emphasize that ExtraModule name and ID are both arbitrary
osandov Mar 24, 2025
4a6a9f3
cli: allow enabling/disabling debug info finders with --{try,no}-symb…
osandov Mar 25, 2025
3736aba
cli: clarify locations -> directories in help strings
osandov Mar 25, 2025
1b05b8c
cli: extract out default_globals()
brenns10 Mar 11, 2025
150ee76
cli: add -e option to exec() code directly
brenns10 Mar 11, 2025
9dea027
tests: add simple CLI smoke test
brenns10 Mar 25, 2025
c521092
cli: fix 'staticmethod' object is not callable for Python < 3.10
brenns10 Mar 25, 2025
4520c3d
cli: set default program for -e
osandov Mar 25, 2025
bafb43f
cli: rename args.script to args.args
osandov Mar 25, 2025
7f63f1a
cli: handle !isatty(stdin)
osandov Mar 25, 2025
f89e3fa
tests: expand CLI tests
osandov Mar 25, 2025
64dd5c8
Add Program.create_loaded_modules()
osandov Mar 25, 2025
21cbafa
libdrgn: debug_info: improve load_debug_info() warnings for kernel
osandov Mar 26, 2025
50bcb65
libdrgn: debug_info: simplify missing debug info error return in load…
osandov Mar 26, 2025
12b789e
cli: log missing main debug info as critical
osandov Mar 26, 2025
9033fb3
drgn.helpers.experimental.kmodify: add wake_up_process() example to c…
osandov Mar 27, 2025
c8c7c17
README: clean up and update installation instructions for libdebuginfod
osandov Apr 1, 2025
75d3ab6
libdrgn: linux_kernel: disable debuginfod except on Fedora
osandov Apr 2, 2025
d03bbe5
cli: include debuginfod support status in version banner
osandov Apr 2, 2025
38f40b3
CI: install pyroute2 < 0.9.1 for Python < 3.9.
osandov Apr 3, 2025
c782893
Add absence reason to absent objects
osandov Apr 7, 2025
2d25e22
Add OPTIMIZED_OUT absence reason and use it for DWARF
osandov Apr 7, 2025
2027d0f
Add NOT_IMPLEMENTED absence reason and use it for DWARF
osandov Apr 7, 2025
644a47b
drgn.helpers.linux.fs: handle DCACHE_MOUNTED value change in 6.15
osandov Apr 8, 2025
36d3065
drgn.helpers.linux.kernfs: add kernfs_parent() and handle 6.15
osandov Apr 8, 2025
70dcba2
drgn.helpers.linux.kernfs: add kernfs_root() helper
osandov Apr 8, 2025
cfe3823
Add 6.15 to supported kernels
osandov Apr 8, 2025
9b7297d
vmtest.config: enable CONFIG_KPROBES for upcoming kmodify breakpoints
osandov Apr 8, 2025
32d29a1
libdrgn: linux_kernel: don't use drgn_module_find_or_create()
osandov Apr 4, 2025
d48a5bb
libdrgn: replace drgn_module_find() with kind-specific find functions
osandov Apr 5, 2025
b9ad36e
libdrgn: hash_table: add delete_entry
osandov Apr 8, 2025
5ce2116
libdrgn: get rid of struct drgn_module_key
osandov Apr 8, 2025
dcf392a
libdrgn: debug_info: index modules by name
osandov Apr 9, 2025
21decd3
Add module lookups by name
osandov Apr 9, 2025
b72fc70
docs: fix formatting of create_loaded_modules() docstring
osandov Apr 9, 2025
4f518e4
Drop "new" return from prog.*_module(create=True)
osandov Apr 9, 2025
d6576fb
docs: split up table of contents into sections
osandov Apr 11, 2025
baa9a14
docs: add man page
osandov Apr 11, 2025
de5d4cc
docs: update Advanced Usage
osandov Apr 11, 2025
63d9fe3
docs: update User Guide
osandov Apr 11, 2025
dee6d4d
Fix the URLs of Oracle Linux documentation
brenns10 Apr 11, 2025
d04dee9
libdrgn: Makefile: add plugins.h to SOURCES
osandov Apr 11, 2025
22ac3f3
tests: don't shell out for CLI tests
osandov Apr 11, 2025
26d6ef8
tests: fix socket ResourceWarning in debuginfod tests
osandov Apr 11, 2025
82bfff4
libdrgn: x86_64: fix restoring rbp for ORC_TYPE_REGS
osandov Apr 11, 2025
4c90e74
libdrgn: optionally split up libdrgn and _drgn Python extension .so f…
osandov Apr 14, 2025
a49bb11
Update libkdumpfile in manylinux wheels to 0.5.5
osandov Apr 14, 2025
4b31a32
vmtest.kbuild: add patch to work around ppc64 build failure
osandov Apr 15, 2025
78ef790
CI: update to Ubuntu 22.04, drop Python 3.6 and 3.7
osandov Apr 15, 2025
235944e
libdrgn: linux_kernel: don't log every module section address
osandov Apr 15, 2025
97a3c5a
cli: document --no-default-{debug,kernel}-directories behavior with p…
osandov Apr 15, 2025
ef3f73b
docs: improve debugging information finder examples
osandov Apr 15, 2025
4834a95
drgn.helpers.linux.mm: fix in_direct_map() docstring
osandov Apr 16, 2025
a938677
docs: revamp Getting Debugging Symbols page
osandov Apr 16, 2025
8449bd7
setup.py: depend on setuptools (for pkg_resources) on Python < 3.8
osandov Apr 16, 2025
0824ffe
docs: add 0.0.31 release highlights
osandov Apr 16, 2025
8209a14
drgn 0.0.31
osandov Apr 16, 2025
3977bdc
tests: fix deserialize_struct64 tests on i386
osandov Apr 19, 2025
20b0ff7
tests: fix issues with CLI test error handling
osandov Apr 25, 2025
7237106
cli: don't enter interactive mode for empty -e argument
osandov Apr 25, 2025
89260b1
vmtest.rootfsbuild: install check
osandov Apr 25, 2025
7d3af16
drgn.helpers.linux.fs: skip cursors in for_each_mount()
brenns10 May 6, 2025
dfe56c2
helpers: add is_pp_page helper
dtatulea Mar 12, 2025
f8bedb9
contrib/pp_leak: add page_pool leak debug scripts
dtatulea Mar 28, 2025
67022e6
libdrgn: python: fix reference leak for held types
brenns10 May 10, 2025
3ccbf9f
libdrgn: python: check correct pointer in StackTrace_dealloc()
osandov May 12, 2025
479c283
libdrgn: python: add missing garbage collection support
osandov May 12, 2025
18d4ed8
libdrgn: elf_symtab: fix comment about skipping local symbols
osandov May 20, 2025
18d342b
docs: clarify Program.symbol() tie-breaking
osandov May 20, 2025
e73a474
libdrgn: elf_symtab: fix overriding partial table with full table
osandov May 20, 2025
c5ebee2
drgn.helpers.linux.mm: fix for_each_vmap_area() example
osandov May 21, 2025
c38cae3
docs: update required Sphinx version to 8.1.3
osandov May 21, 2025
3895083
docs: sort experimental helpers after others
osandov May 21, 2025
f7e788a
drgn.helpers.linux.bitops: use operator.index() instead of int()
osandov May 21, 2025
ec97539
drgn.helpers.linux.bitmap: add bitmap_weight() helper
osandov May 21, 2025
5c7ba3f
drgn.helpers.linux.cpumask: add cpumask_weight() and num_*_cpus() hel…
osandov May 21, 2025
0dec1e7
pre-commit: bump vermin target to Python 3.8
osandov May 23, 2025
91c289e
drgn.helpers.linux: add timekeeping helpers
osandov May 23, 2025
0580ef8
drgndoc: remove unused need_blank_line variable
osandov May 23, 2025
d7dc6cd
pre-commit: drop --no-warn-unused-ignores from mypy
osandov May 23, 2025
620806b
pre-commit: update flake8, mypy, and pre-commit-hooks
osandov May 23, 2025
82f718f
Support multiple address ranges per module
osandov May 27, 2025
8c4abe9
libdrgn: linux_kernel: add all address ranges for kernel modules
osandov May 28, 2025
f0eda9d
Separate debug info options for directories and debug link directories
osandov May 29, 2025
872e7a4
docs: fix escape sequences in docstrings
osandov May 30, 2025
c3a06bf
elf_symtab: support multiple tables per module
brenns10 Mar 13, 2025
683886d
elf_symtab: add support for .gnu_debugdata
brenns10 Mar 13, 2025
cf20342
tests: Add tests for .gnu_debugdata symbol tables
brenns10 May 22, 2025
50efc02
drgn.helpers.linux.timekeeping: make ktime helpers less racy
osandov May 30, 2025
2b93066
tests: skip timekeeping tests using time.clock_gettime_ns() on Python…
osandov Jun 2, 2025
3cebc6d
docs: document optional liblzma dependency
osandov Jun 2, 2025
e57d68e
vmtest.rootfsbuild: install liblzma-dev
osandov Jun 2, 2025
1c341d1
libdrgn: configure: rename --with-liblzma to --with-lzma
osandov Jun 2, 2025
ff93a40
scripts/build_manylinux_in_docker.sh: explicitly enable lzma support
osandov Jun 2, 2025
c7090d2
libdrgn: python: factor out adding booleans to module
osandov Jun 2, 2025
688b162
cli: add lzma support to version string
osandov Jun 2, 2025
a15b520
tests: skip .gnu_debugdata tests if not built with lzma support
osandov Jun 2, 2025
7492550
vmtest.kbuild: add patch to enable CONFIG_PAGE_POOL on old kernels
osandov Jun 2, 2025
454fefc
drgn.helpers.linux.net: raise NotImplementedError when is_pp_page() c…
osandov Jun 3, 2025
f8305c4
tests: add test for drgn.helpers.linux.net.is_pp_page()
osandov Jun 3, 2025
290f51c
tests: add @skip_unless_have_test_kmod to test_is_pp_page()
osandov Jun 3, 2025
db737b6
vmtest/kbuild: add patch to make emergency reboot quieter on old Arm …
osandov Jun 3, 2025
4ce7589
vmtest.vm: use "b" magic sysrq instead of "o"
osandov Jun 3, 2025
65f3474
vmtest.vm: use contextlib.ExitStack to reduce context manager/try nes…
osandov Jun 3, 2025
d5a101c
vmtest.vm: don't run interactively by default
osandov Jun 3, 2025
8b9a23a
vmtest.vm: replace signal handler with setpriv --pdeathsig
osandov Jun 5, 2025
0ca0310
vmtest.githubapi: work around urllib.request leaking Authorization he…
osandov Jun 9, 2025
4cbba41
Add 6.16 to supported kernels
osandov Jun 9, 2025
3ac1f53
tools/fsrefs.py: add mode to find references to a Btrfs subvolume
osandov Jun 6, 2025
079633b
docs: fix inserting local extensions into sys.path
osandov Jun 12, 2025
c644236
execscript: Allow setting the globals
brenns10 Nov 9, 2023
578cbd2
drgn.helpers.common.format: add print_table() helper
osandov Jun 17, 2025
9e833f5
libdrgn: always create all modules in load_debug_info()
brenns10 Jun 18, 2025
6054413
Update elfutils in manylinux wheels to 0.193
osandov Jun 18, 2025
db0295a
libdrgn: string_builder: fix undefined behavior when appending 0 byte…
osandov Jun 18, 2025
f0338e0
docs: add 0.0.32 release highlights
osandov Jun 18, 2025
348d6ef
drgn 0.0.32
osandov Jun 18, 2025
6e695d8
Enhance get_dmesg() and print_dmesg()
YassineLr Jun 17, 2025
2429f4f
tests: fix "can't pickle local object" errors on Python 3.14
osandov Jun 20, 2025
8c6bed7
python: use public version of Py_HashPointer() on Python 3.14
osandov Jun 20, 2025
a028887
CI: add Python 3.14
osandov Jun 20, 2025
ad54981
tests: fix ResourceWarning in test_for_each_module()
osandov Jun 20, 2025
49d7f8a
drgndoc: fix type alias annotation workaround
osandov Jun 20, 2025
e6e8680
Officially drop Python 3.6 and 3.7 support
osandov Jun 20, 2025
21a97dd
plugins: drop pkg_resources fallback for Python 3.6/3.7
osandov Jun 20, 2025
41cc937
python: drop Python 3.6 fallback for _PyObject_GenericGetAttrWithDict()
osandov Jun 20, 2025
1786429
python: drop Python 3.6 fallback for logging hack
osandov Jun 20, 2025
40cf0e9
python: drop Python 3.6 fallback for PyMapping_Items() returning a tuple
osandov Jun 20, 2025
5446714
python: drop PyEval_InitThreads() call for Python 3.6
osandov Jun 20, 2025
7d2631c
python: drop Py_UNREACHABLE() and Py_RETURN_RICHCOMPARE() definitions…
osandov Jun 20, 2025
bed44a0
drgndoc.docstrings: drop Python 3.6 const char fallback
osandov Jun 20, 2025
9701b37
drgndoc: drop Python 3.7 fallback for old ast constant nodes
osandov Jun 20, 2025
e404b63
drgndoc: use dataclasses
osandov Jun 20, 2025
4ffc2dc
contrib/btrfs_tree.py: drop Python 3.6 workaround for _BtrfsItemHandler
osandov Jun 20, 2025
9c0de56
tests: drop Python 3.6/3.7 fallback for unittest.mock.create_autospec()
osandov Jun 20, 2025
f5fa7e7
Revert "tests: skip timekeeping tests using time.clock_gettime_ns() o…
osandov Jun 20, 2025
7733ffb
execscript: drop io.open_code() fallback for Python 3.6/3.7
osandov Jun 20, 2025
b85303a
Drop typing.Literal fallbacks for Python 3.6/3.7
osandov Jun 20, 2025
44b83da
tests: drop class cleanup fallback for Python 3.6/3.7
osandov Jun 20, 2025
75fa078
_drgn.pyi: drop typing_extensions fallbacks for Python 3.6/3.7
osandov Jun 20, 2025
a9a136d
python: use typing.SupportsIndex as IntegerLike
osandov Jun 20, 2025
93c5df3
docs: remove validators from user guide
osandov Jun 20, 2025
9936a49
packit: drop EPEL 8
osandov Jun 27, 2025
d7d75c0
drgn.helpers.linux.kernfs: add kernfs_children() helper
joannekoong Jun 26, 2025
1b09bb8
tests: add kernfs_children() test
joannekoong Jun 26, 2025
5998092
drgn.helpers.linux.printk: fix code style
osandov Jul 1, 2025
11c5894
scripts/build_manylinux_in_docker.sh: remove aclocal workaround
osandov Jul 2, 2025
ace0c7c
_drgn_util.typingutils: add decorators for copying function/method si…
osandov Jun 11, 2025
eada076
_drgn_util: add argparse help formatter that supports multiple lines
osandov Jun 11, 2025
19cfb6b
drgndoc: store value of variables
osandov Jun 12, 2025
392a998
Add command framework
osandov Jun 18, 2025
b1607d6
Add crash compatibility mode
osandov Jun 18, 2025
aa1b1df
crash: add mount command
osandov Jun 18, 2025
11d6d60
helpers: linux: pid: add for_each_task_in_group()
brenns10 May 13, 2025
fba8f1d
contrib: add pstack.py script to print kernel + user stack
brenns10 Feb 5, 2025
560b00a
drgn.helpers.linux.sched: add get_task_state()
osandov Jul 3, 2025
105e869
drgn.helpers.linux.sched: add task_on_cpu()
osandov Jul 4, 2025
84326fa
Add get_task_rss_info helper
YassineLr Jul 3, 2025
629bea5
drgndoc: fix DrgnCommandDirective on Sphinx < 7.4
osandov Jul 8, 2025
9e62d68
drgndoc: use NamedTuple for {Bound,Resolved}Node to fix mypy error
osandov Jul 8, 2025
4f41106
drgndoc: fix command usage string for positional arguments in mutuall…
osandov Jul 5, 2025
f0255d3
drgndoc: ignore command arguments with help=argparse.SUPPRESS
osandov Jul 7, 2025
cea2078
drgn.commands: format manual usage strings in rST
osandov Jul 7, 2025
a577a0c
tests: check --drgn output of crash commands
osandov Jul 8, 2025
4477c08
python: add drgn.Program.config
osandov Jul 8, 2025
f325a4e
crash: pipe to pager by default
osandov Jul 7, 2025
6a22d13
drgn.helpers.linux.panic: add panic_task()
osandov Jul 4, 2025
7036ade
drgn.commands.crash: add function for merging imports in Python sourc…
osandov Jul 5, 2025
ec3644a
crash: port set command
osandov Jul 8, 2025
2766620
crash: mount: use add_crash_context() for --drgn
osandov Jul 8, 2025
7f7529e
drgndoc: fix DrgnCommandDirective more for Sphinx < 8.1
osandov Jul 8, 2025
9928e26
drgndoc: go back to defining BoundNode and ResolvedNode manually
osandov Jul 8, 2025
0d8c3fc
Revert "contrib/btrfs_tree.py: drop Python 3.6 workaround for _BtrfsI…
osandov Jul 8, 2025
9a38aeb
contrib/btrfs_tree.py: update generic NamedTuple workaround comment
osandov Jul 8, 2025
bf831c1
tests: exec() --drgn output of crash commands
osandov Jul 9, 2025
e574b20
drgn.helpers.linux.timekeeping: use CRASHTIME for ktime_get_real_seco…
osandov Jul 8, 2025
cb96ae7
libdrgn: factor fd_canonical_path() out of drgn_module_try_file_inter…
osandov Jul 9, 2025
5f037a0
Add drgn.Program.core_dump_path/drgn_program_core_dump_path()
osandov Jul 9, 2025
f0b8a7b
drgn.helpers.linux.printk: allow disabling timestamps entirely in {ge…
osandov Jul 9, 2025
32095eb
drgn.helpers.common.format: add double_quote_ascii_string()
osandov Jul 9, 2025
efdf6fd
drgn.helpers.linux.panic: add panic_message()
osandov Jul 9, 2025
b6953d7
drgn.helpers.linux.kconfig: factor reading raw kconfig data out of ge…
osandov Jul 9, 2025
b99ce8a
crash: port sys command
osandov Jul 9, 2025
c559cf6
contrib: delete kernel_sys.py
osandov Jul 9, 2025
0a2abf5
Revert "tests: disable get_kconfig() test on Arm"
osandov Jul 9, 2025
6067b21
Rename drgn/commands/_builtin/crash/sys{,tem}.py
osandov Jul 10, 2025
b1cf7b6
add new script for stack trace and local variables
qiyeliu Jul 10, 2025
74df6aa
libdrgn: elf_symtab: don't apply bias to per-CPU symbols
osandov Jul 10, 2025
6daaaa9
libdrgn: object: fix array subscript with negative index
osandov Jul 12, 2025
b7e2099
Add array slicing
osandov Jul 14, 2025
8fc82c5
format thread_info value as hex in sys.py
qiyeliu Jul 16, 2025
5ad6c22
python: raise drgn.ObjectNotFoundError instead of KeyError/LookupError
osandov Jul 17, 2025
9171ba5
drgn.commands: handle broken pipe when running command
osandov Jul 18, 2025
7db6b61
drgn.helpers.linux.percpu: fix percpu_counter_sum() on !SMP
osandov Jul 22, 2025
c896644
drgn.helpers.linux.mm: fix get_task_rss_info() on Linux < 6.2 with !SMP
osandov Jul 22, 2025
c1a4099
drgn.helpers.linux.mm: fix MM_SHMEMPAGES checks in get_task_rss_info()
osandov Jul 22, 2025
05ed1c9
vmtest.config: enable CONFIG_SCHEDSTATS for testing new sched helpers
osandov Jul 23, 2025
2ed3477
tests: add environment variables for logging crash command output
osandov Jul 16, 2025
613eb5c
commands: add DrgnCodeBuilder and use it for --drgn output
osandov Jul 16, 2025
458969d
drgn.commands.crash: add functions for working with CPU specifiers
osandov Jul 24, 2025
f0be6e0
Add drgn.Type.variable_declaration()/drgn_format_variable_declaration()
osandov Jul 15, 2025
9084b50
libdrgn: lexer: add DRGN_{,_C_FAMILY}_LEXER scope guard
osandov Jul 11, 2025
cd465e8
libdrgn: generalize drgn_language::bit_offset() to type_subobject()
osandov Jul 11, 2025
a830933
Add drgn.Object.subobject_()/drgn_object_subobject()
osandov Jul 11, 2025
403bd6b
drgn.helpers.common.type: add typeof_member()
osandov Jul 11, 2025
e35e9ac
crash: port struct and union commands
osandov Jul 25, 2025
0e22c53
drgn.commands.crash: rework ! support
osandov Jul 25, 2025
eb7af0c
drgndoc.commands: handle crash_custom_command
osandov Jul 25, 2025
5002f16
drgndoc.commands: escape asterisks in command name
osandov Jul 25, 2025
a5ec521
crash: port * command and implicit struct/union
osandov Jul 25, 2025
34d8ffc
crash: sort commands in "help all"
osandov Jul 25, 2025
d7cf0f1
crash: struct/union: wrap objects to terminal width
osandov Jul 25, 2025
ea7e349
crash: struct/union: don't dereference members
osandov Jul 25, 2025
89dfa85
crash: fix implicit struct/union with members
osandov Jul 25, 2025
b94cf72
crash: struct/union: reformat address_or_symbol parsing
osandov Jul 25, 2025
5265bbe
tests: fix crash struct cpuspec tests on !SMP
osandov Jul 28, 2025
3fbb9d7
libdrgn: pass options struct to drgn_format_object()
osandov Jul 28, 2025
05c459c
Add integer_base option to drgn.Object.format_()/drgn_format_object()
osandov Jul 28, 2025
5dbabef
crash: set: add radix option
osandov Jul 28, 2025
4b9eb0e
crash: struct/union: honor radix option
osandov Jul 28, 2025
3eade28
crash: struct/union: add -x and -d options
osandov Jul 28, 2025
454f939
tests: add possible_cpus() helper function
osandov Jul 28, 2025
37f8eaa
crash: port p command (without expression evaluation)
osandov Jul 28, 2025
58aebf9
add new script to display page state for a given PID and VADDR
qiyeliu Jul 17, 2025
91da9ac
Migrate runq related helpers from drgn-tools
richl9 Jul 15, 2025
115a6ec
drgn.helpers.linux.sched: rename task_lastrun2now() -> task_since_las…
osandov Aug 5, 2025
133d40a
drgn.helpers.linux.timekeeping: handle tk_core change in Linux 6.17
osandov Aug 12, 2025
a0eb430
tools.fsrefs: handle Btrfs block device holder change in Linux 6.17
osandov Aug 12, 2025
a95728f
Add 6.17 to supported kernels
osandov Aug 12, 2025
52bcf25
drgn.commands: use argparse to generate help for custom commands
osandov Aug 12, 2025
c9d3c98
drgn.commands: escape "%" in help strings for argparse
osandov Aug 13, 2025
7a6f748
crash: port eval command
osandov Aug 13, 2025
8fe1c15
drgn.helpers.linux.rbtree: add rbtree_preorder_for_each{,_entry}() he…
osandov Aug 15, 2025
a1c576e
drgn.commands.crash: change _guess_type() argument order
osandov Aug 14, 2025
42057db
drgn.commands.crash: move struct convenience functions
osandov Aug 15, 2025
e7dd08a
crash: port tree command
osandov Aug 15, 2025
05e19ec
tools/fsrefs.py: fix incorrect "unknown uprobe" message
osandov Aug 18, 2025
579f0b9
tests: update tests that check init_task.comm for Linux 6.17
osandov Aug 18, 2025
4083e72
crash: double quote strings in --drgn output
osandov Aug 18, 2025
34c916a
drgndoc.commands: handle tuple metavar
osandov Aug 18, 2025
fd57d02
drgn.helpers.linux.module: add module_taints() helper
osandov Aug 18, 2025
b26d348
drgn.helpers.linux.panic: add tainted() helper
osandov Aug 18, 2025
b42dd7a
crash: port mod command
osandov Aug 18, 2025
683b52c
crash: port btop and ptob commands
osandov Aug 19, 2025
c548be7
_drgn_util.platform: add ioctl definitions
osandov Aug 21, 2025
a6bbc67
tests: separate fallocate() from mkswap()
osandov Aug 21, 2025
7f37596
tests: add function for writing MBR partition table
osandov Aug 21, 2025
d1d0df2
drgn.helpers.linux.swap: add new swap helpers
osandov Aug 21, 2025
f217e83
crash: port swap command
osandov Aug 21, 2025
2a0c489
DLPX-95232 Merge conflict with upstream drgn
mmaybee Aug 26, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 8 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,12 @@ concurrency:

jobs:
test:
# We're stuck on Ubuntu 20.04 as long as we want to keep testing on Python
# 3.6 due to actions/setup-python#544.
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: ${{ (github.event_name == 'push' || inputs.test_all_python_versions)
&& fromJSON('["3.13", "3.12", "3.11", "3.10", "3.9", "3.8", "3.7", "3.6"]')
|| fromJSON('["3.12", "3.6"]')}}
&& fromJSON('["3.14", "3.13", "3.12", "3.11", "3.10", "3.9", "3.8"]')
|| fromJSON('["3.13", "3.8"]')}}
cc: [gcc, clang]
fail-fast: false
env:
Expand All @@ -55,21 +53,18 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Check Python version for pre-commit
# Only run pre-commit / mypy on upstream supported Python versions
run: |
if [[ "${{ matrix.python-version }}" =~ ^3\.([89]|[0-9][0-9])$ ]]; then
echo USE_PRE_COMMIT=1 >> $GITHUB_ENV
fi
- name: Install dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y btrfs-progs check dwarves libelf-dev libdw-dev qemu-kvm zstd ${{ matrix.cc == 'clang' && 'libomp-$(clang --version | sed -rn "s/.*clang version ([0-9]+).*/\\1/p")-dev' || '' }}
pip install pyroute2 setuptools ${USE_PRE_COMMIT/1/pre-commit}
# pyroute2 0.9.1 dropped support for Python < 3.9.
if [[ "${{ matrix.python-version }}" =~ ^3\.[678]$ ]]; then
pyroute2_version="<0.9.1"
fi
pip install "pyroute2$pyroute2_version" setuptools pre-commit
- name: Generate version.py
run: python setup.py --version
- name: Check with mypy
if: ${{ env.USE_PRE_COMMIT == '1' }}
run: pre-commit run --all-files mypy
- name: Build and test with ${{ matrix.cc }}
run: CONFIGURE_FLAGS="--enable-compiler-warnings=error" python setup.py test -K ${{ inputs.test_all_kernel_flavors && '-F' || '' }}
Expand Down
24 changes: 16 additions & 8 deletions .github/workflows/dco-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,22 @@ jobs:
git init
git fetch --filter=blob:none "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY" "$GITHUB_BASE_REF" "$GITHUB_REF"
- name: Check for DCO sign-offs
shell: bash
run: |
no_sign_off="$(git log --no-merges --grep=Signed-off-by --invert-grep "FETCH_HEAD..$GITHUB_SHA")"
if [ -z "$no_sign_off" ]; then
status=0
while read -r commit; do
author="$(git show --no-patch --pretty='format:%an <%ae>' "$commit")"
if ! git show --no-patch --pretty='format:%(trailers:key=Signed-off-by,valueonly)' "$commit" | grep -Fxq "$author"; then
if [ $status -eq 0 ]; then
echo "The following commits are missing a Developer Certificate of Origin sign-off;"
echo "see https://github.com/osandov/drgn/blob/main/CONTRIBUTING.rst#signing-off"
echo
fi
status=1
git show --no-patch "$commit"
fi
done < <(git rev-list --no-merges "FETCH_HEAD..$GITHUB_SHA")
if [ $status -eq 0 ]; then
echo "All commits have a Developer Certificate of Origin sign-off"
else
echo "The following commits are missing a Developer Certificate of Origin sign-off;"
echo "see https://github.com/osandov/drgn/blob/main/CONTRIBUTING.rst#signing-off"
echo
echo "$no_sign_off"
exit 1
fi
exit $status
4 changes: 1 addition & 3 deletions .github/workflows/vmtest-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ jobs:
arch: [x86_64, aarch64, ppc64, s390x, arm]
fail-fast: false
max-parallel: 5
# Build on 20.04 so that we don't get host binaries (e.g., objtool) that
# depend on libraries too new for other distros.
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
permissions:
contents: write
env:
Expand Down
8 changes: 0 additions & 8 deletions .packit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ jobs:
fedora-eln-ppc64le: {}
fedora-eln-s390x: {}
fedora-eln-x86_64: {}
epel-8-aarch64: {}
epel-8-ppc64le: {}
epel-8-s390x: {}
epel-8-x86_64: {}
centos-stream+epel-next-9-aarch64:
additional_repos:
- https://kojihub.stream.centos.org/kojifiles/repos/c9s-build/latest/aarch64/
Expand Down Expand Up @@ -65,10 +61,6 @@ jobs:
fedora-eln-ppc64le: {}
fedora-eln-s390x: {}
fedora-eln-x86_64: {}
epel-8-aarch64: {}
epel-8-ppc64le: {}
epel-8-s390x: {}
epel-8-x86_64: {}
centos-stream+epel-next-9-aarch64:
additional_repos:
- https://kojihub.stream.centos.org/kojifiles/repos/c9s-build/latest/aarch64/
Expand Down
2 changes: 2 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ build:
os: ubuntu-22.04
tools:
python: "3"
apt_packages:
- graphviz
sphinx:
configuration: docs/conf.py
python:
Expand Down
10 changes: 3 additions & 7 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,11 @@ instructions <README.rst#from-source>`_, then run:
$ CONFIGURE_FLAGS="--enable-compiler-warnings=error" python3 setup.py build_ext -i
$ python3 -m drgn --help

Drgn can build, run, and pass its test suite on Python 3.6 or later. However,
Drgn can build, run, and pass its test suite on Python 3.8 or later. However,
many of the tools used as part of the development workflow do not support Python
versions once they have reached their end-of-life. Thus, your main drgn
development environment should use a Python version which is actively supported
upstream. In particular, the drgn development workflow no longer supported on
Python 3.6.
upstream.

Testing
-------
Expand Down Expand Up @@ -74,9 +73,6 @@ Or you can run them manually:

$ pre-commit run --all-files

Please remember that these pre-commit hooks do not support Python 3.6; they
require a Python major version which is actively supported upstream.

Coding Guidelines
-----------------

Expand Down Expand Up @@ -189,7 +185,7 @@ drgn assumes some `implementation-defined behavior
Python
^^^^^^

Python code in drgn should be compatible with Python 3.6 and newer.
Python code in drgn should be compatible with Python 3.8 and newer.

Python code is formatted with `Black <https://github.com/psf/black>`_ and
`isort <https://github.com/PyCQA/isort>`_.
Expand Down
77 changes: 37 additions & 40 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,17 @@ Package Manager

drgn can be installed using the package manager on some Linux distributions.

.. image:: https://repology.org/badge/vertical-allrepos/drgn.svg
.. image:: https://repology.org/badge/vertical-allrepos/drgn.svg?exclude_unsupported=1
:target: https://repology.org/project/drgn/versions
:alt: Packaging Status

* Fedora >= 32
* Fedora, RHEL/CentOS Stream >= 9

.. code-block:: console

$ sudo dnf install drgn

* RHEL/CentOS >= 8
* RHEL/CentOS < 9

`Enable EPEL <https://docs.fedoraproject.org/en-US/epel/#_quickstart>`_. Then:

Expand All @@ -86,32 +86,35 @@ drgn can be installed using the package manager on some Linux distributions.

* Oracle Linux >= 8

Enable the ``ol8_addons`` or ``ol9_addons`` repository and install drgn:
Enable the ``ol8_addons`` or ``ol9_addons`` repository. Then:

.. code-block:: console

$ sudo dnf config-manager --enable ol8_addons # OR: ol9_addons
$ sudo dnf install drgn

Drgn is also available for Python versions in application streams. For
drgn is also available for Python versions in application streams. For
example, use ``dnf install python3.12-drgn`` to install drgn for Python 3.12.
See the documentation for drgn in `Oracle Linux 9
<https://docs.oracle.com/en/operating-systems/oracle-linux/9/drgn/how_to_install_drgn.html>`_
and `Oracle Linux 8
<https://docs.oracle.com/en/operating-systems/oracle-linux/8/drgn/how_to_install_drgn.html>`_
for more information.

* Arch Linux
* Debian >= 12 (Bookworm)/Ubuntu >= 24.04 (Noble Numbat)

.. code-block:: console

$ sudo pacman -S drgn
$ sudo apt install python3-drgn

* Debian >= 12 (Bookworm)
To get the latest version on Ubuntu, enable the `michel-slm/kernel-utils PPA
<https://launchpad.net/~michel-slm/+archive/ubuntu/kernel-utils>`_ first.

* Arch Linux

.. code-block:: console

$ sudo apt install python3-drgn
$ sudo pacman -S drgn

* Gentoo

Expand All @@ -125,15 +128,6 @@ drgn can be installed using the package manager on some Linux distributions.

$ sudo zypper install python3-drgn

* Ubuntu

Enable the `michel-slm/kernel-utils PPA <https://launchpad.net/~michel-slm/+archive/ubuntu/kernel-utils>`_.
Then:

.. code-block:: console

$ sudo apt install python3-drgn

pip
^^^

Expand All @@ -152,27 +146,29 @@ This will install a binary wheel by default. If you get a build error, then pip
wasn't able to use the binary wheel. Install the dependencies listed `below
<#from-source>`_ and try again.

Note that RHEL/CentOS 6, Debian Stretch, Ubuntu Trusty, and Ubuntu Xenial (and
older) ship Python versions which are too old. Python 3.6 or newer must be
installed.
Note that RHEL/CentOS 7, Debian 10 ("buster"), and Ubuntu 18.04 ("Bionic
Beaver") (and older) ship Python versions which are too old. Python 3.8 or
newer must be installed.

.. _installation-from-source:

From Source
^^^^^^^^^^^

To get the development version of drgn, you will need to build it from source.
First, install dependencies:

* Fedora
* Fedora, RHEL/CentOS Stream >= 9

.. code-block:: console

$ sudo dnf install autoconf automake check-devel elfutils-devel gcc git libkdumpfile-devel libtool make pkgconf python3 python3-devel python3-pip python3-setuptools
$ sudo dnf install autoconf automake check-devel elfutils-debuginfod-client-devel elfutils-devel gcc git libkdumpfile-devel libtool make pkgconf python3 python3-devel python3-pip python3-setuptools xz-devel

* RHEL/CentOS/Oracle Linux
* RHEL/CentOS < 9, Oracle Linux

.. code-block:: console

$ sudo dnf install autoconf automake check-devel elfutils-devel gcc git libtool make pkgconf python3 python3-devel python3-pip python3-setuptools
$ sudo dnf install autoconf automake check-devel elfutils-devel gcc git libtool make pkgconf python3 python3-devel python3-pip python3-setuptools xz-devel

Optionally, install ``libkdumpfile-devel`` from EPEL on RHEL/CentOS >= 8 or
install `libkdumpfile <https://github.com/ptesarik/libkdumpfile>`_ from
Expand All @@ -191,28 +187,29 @@ First, install dependencies:

.. code-block:: console

$ sudo apt install autoconf automake check gcc git liblzma-dev libelf-dev libdw-dev libtool make pkgconf python3 python3-dev python3-pip python3-setuptools zlib1g-dev
$ sudo apt install autoconf automake check gcc git libdebuginfod-dev libkdumpfile-dev liblzma-dev libelf-dev libdw-dev libtool make pkgconf python3 python3-dev python3-pip python3-setuptools zlib1g-dev

Optionally, install libkdumpfile from source if you want support for the
makedumpfile format.
On Debian <= 11 (Bullseye) and Ubuntu <= 22.04 (Jammy Jellyfish),
``libkdumpfile-dev`` is not available, so you must install libkdumpfile from
source if you want support for the makedumpfile format.

* Arch Linux

.. code-block:: console

$ sudo pacman -S --needed autoconf automake check gcc git libelf libkdumpfile libtool make pkgconf python python-pip python-setuptools
$ sudo pacman -S --needed autoconf automake check gcc git libelf libkdumpfile libtool make pkgconf python python-pip python-setuptools xz

* Gentoo

.. code-block:: console

$ sudo emerge --noreplace --oneshot dev-build/autoconf dev-build/automake dev-libs/check dev-libs/elfutils sys-devel/gcc dev-vcs/git dev-libs/libkdumpfile dev-build/libtool dev-build/make dev-python/pip virtual/pkgconfig dev-lang/python dev-python/setuptools
$ sudo emerge --noreplace --oneshot dev-build/autoconf dev-build/automake dev-libs/check dev-libs/elfutils sys-devel/gcc dev-vcs/git dev-libs/libkdumpfile dev-build/libtool dev-build/make dev-python/pip virtual/pkgconfig dev-lang/python dev-python/setuptools app-arch/xz-utils

* openSUSE

.. code-block:: console

$ sudo zypper install autoconf automake check-devel gcc git libdw-devel libelf-devel libkdumpfile-devel libtool make pkgconf python3 python3-devel python3-pip python3-setuptools
$ sudo zypper install autoconf automake check-devel gcc git libdebuginfod-devel libdw-devel libelf-devel libkdumpfile-devel libtool make pkgconf python3 python3-devel python3-pip python3-setuptools xz-devel

Then, run:

Expand All @@ -233,20 +230,20 @@ Quick Start

.. start-quick-start

drgn debugs the running kernel by default; run ``sudo drgn``. To debug a
running program, run ``sudo drgn -p $PID``. To debug a core dump (either a
kernel vmcore or a userspace core dump), run ``drgn -c $PATH``. Make sure to
`install debugging symbols
drgn debugs the running kernel by default; simply run ``drgn``. To debug a
running program, run ``drgn -p $PID``. To debug a core dump (either a kernel
vmcore or a userspace core dump), run ``drgn -c $PATH``. Make sure to `install
debugging symbols
<https://drgn.readthedocs.io/en/latest/getting_debugging_symbols.html>`_ for
whatever you are debugging.

Then, you can access variables in the program with ``prog['name']`` and access
Then, you can access variables in the program with ``prog["name"]`` and access
structure members with ``.``:

.. code-block:: pycon

$ sudo drgn
>>> prog['init_task'].comm
$ drgn
>>> prog["init_task"].comm
(char [16])"swapper/0"

You can use various predefined helpers:
Expand All @@ -260,14 +257,14 @@ You can use various predefined helpers:
[b'findmnt', b'-p']

You can get stack traces with ``stack_trace()`` and access parameters or local
variables with ``trace['name']``:
variables with ``trace["name"]``:

.. code-block:: pycon

>>> trace = stack_trace(task)
>>> trace[5]
#5 at 0xffffffff8a5a32d0 (do_sys_poll+0x400/0x578) in do_poll at ./fs/select.c:961:8 (inlined)
>>> poll_list = trace[5]['list']
>>> poll_list = trace[5]["list"]
>>> file = fget(task, poll_list.entries[0].fd)
>>> d_path(file.f_path.address_of_())
b'/proc/115/mountinfo'
Expand Down
Loading