Tags: Byte-Lab/drgn
Tags
drgn 0.0.17 New features: - A new API representing threads was added. The `Thread` class represents a thread. `Thread.stack_trace()` returns the stack trace for the thread. `Program.threads()` returns an iterator over the threads in the program. `Program.thread()` returns a thread given its thread ID. `Program.main_thread()` returns the main thread of the program. `Program.crashed_thread()` returns the thread that caused the program to crash. Contributed by Kevin Svetlitski and Mykola Lysenko. - `Program.symbols()` was added. It returns all ELF symbols in the program, optionally filtered by a name or address. Contributed by Stephen Brennan. - Support for looking up C++ classes with `Program.type()` was added. Contributed by Mykola Lysenko. - Support for setting the default program language (`Program.language`) was added. - Helpers for getting the Linux kernel log buffer were added (`drgn.helpers.linux.printk.get_printk_records()` and `drgn.helpers.linux.printk.get_dmesg()`). Contributed by Alex Zhu. - Helpers for translating between Linux kernel socket objects and inode objects were added (`drgn.helpers.linux.net.SOCKET_I()` and `drgn.helpers.linux.net.SOCK_INODE()`). Contributed by Peilin Ye. - A helper for getting the Linux kernel's idle tasks was added (`drgn.helpers.linux.sched.idle_task()`). - A helper for decoding Linux kernel `struct page` flags was added (`drgn.helpers.linux.mm.decode_page_flags()`). - Generic helpers for decoding flags were added (`drgn.helpers.decode_flags()` and `drgn.helpers.decode_enum_type_flags()`). Bug fixes: - A crash when encountering kernel modules processed by `objcopy --only-keep-debug` was fixed. Contributed by Peilin Ye. - An endianness bug when debugging kernel modules that use a different byte order than the host was fixed. - A compilation error on older versions of GCC was fixed. Contributed by Alakesh Haloi. - libdrgn is now linked against libm to fix undefined references to `rint`. - `drgn.helpers.linux.percpu.per_cpu_ptr()` was fixed to support !SMP kernels. - A `TypeError` when `drgn.helpers.linux.rbtree.rb_find()` doesn't find a match was fixed. - A memory leak when using an invalid `TypeTemplateParameter` was fixed. - A missing type annotation for `drgn.Language.CPP` was added. - `drgn_stack_trace_destroy()` was fixed to allow a `NULL` argument like other `destroy()` functions. Other improvements: - Linux kernel support was tested up to v5.17-rc6. - The CLI now diagnoses the common mistake of passing a core dump file where a script is expected. - `drgn.helpers.linux.list.list_for_each_entry()`, `drgn.helpers.linux.list.list_for_each_entry_reverse()`, `drgn.helpers.linux.list.hlist_for_each_entry()`, `drgn.helpers.linux.list_nulls.hlist_nulls_for_each_entry()`, and `drgn.helpers.linux.rbtree.rbtree_inorder_for_each_entry()` were optimized to only look up the entry type once per call. - Parsing of type names in `Program.type()` was slightly optimized. - Lookups of built-in kernel variables (e.g., `UTS_RELEASE`, `PAGE_SIZE`) were slightly optimized. - `Program.type()` now accepts a `Type`. This makes it easier to write helpers that accept a type name or a `Type`. Build system: - Python is now required to build libdrgn even if the Python bindings are disabled. - GNU Awk is no longer required to build drgn. - Additional compiler warnings are now enabled by default. Developers should enable them as errors. - Configuration options for developers to enable ASan (contributed by Kevin Svetlitski) and UBSan were added. Internal: - Developer documentation was improved. - [`pre-commit`](https://pre-commit.com/) was configured to enforce coding standards. Contributed by Stephen Brennan. - s390x and EPEL 9 builds were enabled on Packit. Contributed by Davide Cavalca. - Test cases using `/proc/vmcore` in a kdump environment were added. Contributed by Kevin Svetlitski. - Test cases for the Linux kernel red-black tree and linked list helpers were added.
drgn 0.0.16 This is a small release to fix a couple of issues with debuginfod. Bug fixes: - A crash or hang when downloading debugging information from debuginfod was fixed. Other improvements: - The CLI now prints debuginfod download progress. - Some missing files were added to the source distribution.
drgn 0.0.15
New features:
- `Symbol.binding` and `Symbol.kind` were added to provide more information about symbols (e.g., whether a symbol is global or local, whether it refers to a function or variable).
- `Program.symbol(name)` now falls back to returning a local symbol if a matching global symbol was not found.
- Helpers for looking up network namespaces were added (`drgn.helpers.linux.net.for_each_net()` and `drgn.helpers.linux.net.get_ns_by_{inode,fd}()`).
- More networking helpers were added (`drgn.helpers.linux.net.netdev_for_each_tx_queue()` and `drgn.helpers.linux.tc.qdisc_lookup()`).
- Partial support for alternate DWARF files (`.gnu_debugaltlink`) was added. These are created by DWZ and used by Linux distros in some debugging symbol packages. Types and objects from the alternate file can not yet be looked up by name.
Bug fixes:
- A workaround was added for a bug in elfutils 0.183-0.185 that causes crashes when targeting userspace core dumps.
- Reading memory from a core dump was fixed to return a fault error instead of zeros for regions that were not saved in the core dump.
- Type name formatting was fixed to not include the entire definition of anonymous types.
- Parsing of DWARF representing an enum type which is backed by a typedef was fixed (now the underlying type is used).
- ELF core dump note matching was fixed to use an exact name match instead of a prefix match.
- Support for variable locations in DWARF 3 files was fixed.
- Support for structure member locations in DWARF 2 files was fixed.
- A memory leak when targeting a makedumpfile compressed kernel core dump was fixed.
- Indexing debugging symbols for a C++ namespace was fixed to be parallelized as intended.
- Incorrect memory allocation error checks were fixed for a couple of hash table insertions.
- Incorrect cleanup after failing to index DWARF information was fixed.
- An incorrect error when failing to get the build ID of an ELF file was fixed.
- A dropped error when applying ELF relocations was fixed.
- A missing error check in the C implementation of `drgn.helpers.linux.pid.pid_task()` was added.
- A missing error check when parsing C type names was fixed.
- An incorrect error return when memory allocation failed while parsing an array type from DWARF was fixed.
Other improvements:
- Memory usage after loading debugging symbols was decreased (by more aggressively freeing unneeded memory and by lazily allocating memory for C++ namespaces).
- Stack trace variable resolution in inline functions was optimized (by optimizing how we look up the context of an inline function).
- Type and object lookups were optimized (by avoiding OpenMP overhead after the DWARF information was already indexed).
- Installation documentation was improved.
- Documentation for getting debugging symbols was added.
- Linux 5.15 and 5.16 were tested and did not require any changes.
Internal:
- Debugging information handling was reorganized to prepare for upcoming changes.
- Tests were added for the cgroup helpers.
- [Packit](https://packit.dev/) configuration was added.
drgn 0.0.14
New features:
- Support for DWARF 5 was added.
- Object.from_bytes_() was added. It creates an object from its binary
representation.
- Object.to_bytes_() was added. It gets the binary representation of an
object.
- Helpers for Linux kernel NUMA node masks were added
(drgn.helpers.linux.nodemask).
- Helpers for Linux kernel bit operations were added
(drgn.helpers.linux.bitops).
- Helpers for getting network devices by name or interface index were
added (drgn.helpers.linux.net.netdev_get_by_{index,name}()).
- drgn.helpers.linux.sched.task_state_to_char() was updated for Linux
v5.14.
Fixes:
- A bug when translating values from little-endian to big-endian was
fixed.
- A workaround for a bug in elfutils < 0.177 was (re)added. The bug
causes stdin to be closed and another file descriptor to be leaked
when targeting a userspace core dump.
- Support for the kdump format was fixed (it was broken in v0.0.12 and
v0.0.13).
- A potential buffer overread caused by DWARF information with an
invalid DW_AT_strp value was fixed.
- A potential buffer overread caused by DWARF information with an
invalid 64-bit size on a 32-bit system was fixed.
- Missing support for the DWARF DW_FORM_block encoding was added.
- Support for DW_FORM_ref_addr in DWARF 2 files was fixed to use the
correct size.
- "Non-canonical" LEB128 values are now handled correctly.
- Stack trace object lookups and source location lookups were fixed for
files with incomplete .debug_aranges information (e.g., the Linux
kernel when compiled by Clang).
- drgn.helpers.linux.cpumask.for_each_cpu() was fixed to not read out of
bounds in kernels configured with CONFIG_CPUMASK_OFFSTACK (e.g.,
Fedora kernels).
drgn 0.0.12 New features: * Support for getting parameters and variables in stack frames was added (e.g., prog.stack_trace(1)[0]). * Stack traces now contain stack frames for inlined function calls. * StackFrame.name, StackFrame.is_inline, and StackFrame.source() were added. * Pretty-printing for stack frames was added. * Support for DWARF type units was added by Jay Kamat. * Support for DWARF DW_FORM_indirect was added by Jay Kamat. API changes: * The format of pretty-printed stack traces was changed. Fixes: * Evaluation of DWARF expressions was hardened against infinite loops. * An invalid memory access/potential crash caused by a bad DW_OP_deref instruction in a DWARF expression was fixed. * Addresses are now defined to wrap after the maximum address when reading memory. * Memory reads from live processes was fixed on 32-bit hosts. * Reading 32-bit float object values was fixed on big-endian hosts. * A couple of minor packaging issues were fixed. * Support for Python 3.10 (as of beta 2) was added. * Incorrect type annotations for drgn.FaultError were fixed. * Missing documentation and type annotations were added for Program.__contains__(). Internals: * Usage of OpenMP tasking was removed. * Kernel builds for VM testing were moved to GitHub releases. * Scheduled kernel builds for VM testing were added.
drgn 0.0.10
New features:
* The elfutils DWARF stack unwinder was replaced with our own.
* Stack unwinding using the Linux kernel's ORC data was added. This
makes it possible to unwind through functions written in assembly
(including interrupt handlers).
* StackFrame.interrupted was added to distinguish between stack frames
created by a function call and stack frames for a signal, interrupt,
etc.
API changes:
* Support for complex types was removed. It was previously broken and
incomplete. A proper implementation may be re-added if there is demand
for it.
* The byte order (a.k.a. endianness) property of objects was reworked so
that it is now defined for scalars rather than compound objects.
* A byteorder argument was added to Program.int_type(),
Program.bool_type(), Program.float_type(), and
Program.pointer_type(). Type.byteorder was added to the
corresponding types.
* Object.byteorder_ was removed, as was the byteorder argument to
Object().
Fixes:
* A couple of cases where debugging information for predeclared types
was not correctly parsed were fixed.
* Variables and functions from an .init section in a Linux kernel module
are now reported with the address where they were last loaded. (.init
sections are freed after module initialization.)
* Creation of structure objects containing unnamed members from a Python
object (Object(prog, "struct foo", {...})) was fixed. In 0.0.9, this
would place members in the unnamed member at the wrong location.
* TypeMember.__repr__() was fixed to include the bit field size if the
member is a bit field. This was omitted by mistake in 0.0.9.
* drgn_object_dereference_offset() and drgn_object_member_dereference()
were fixed to be properly exported from libdrgn.so.
* Unused declarations of drgn_type_eq() and drgn_qualified_type_eq()
were removed from drgn.h. The definitions were removed in 0.0.9.
Packaging improvements:
* The patched version of elfutils bundled with drgn was removed. drgn
now uses the system's libelf and libdw. Version 0.165 or newer is
required.
* The autotools output (configure, Makefile.in, etc.) was added to
source distributions. autotools is no longer required for installing
drgn from a source distribution.
PreviousNext