drgn/libdrgn/python
Omar Sandoval 7ce84a3f1f drgn.helpers.linux: add proper XArray helpers
Commit 89eb868e95 ("helpers: make find_task() work on recent kernels")
made radix_tree_lookup() and radix_tree_for_each() work for basic
XArrays. However, it doesn't handle a couple of more advanced features:
multi-index entries (which old radix trees actually also supported) and
zero entries. It has also been really confusing to explain to people
unfamiliar with the radix tree -> XArray transition that they should use
helpers named radix_tree for a structure named xarray.

So, let's finally add xa_load(), xa_for_each(), and some additional
auxiliary helpers. The non-recursive xa_for_each() implementation is
based on Kevin Svetlitski's C implementation from commit 2b47583c73
("Rewrite linux helper iterators in C"). radix_tree_lookup() and
radix_tree_for_each() share the implementation with xa_load() and
xa_for_each(), respectively, so they are mostly interchangeable.

Fixes: #61

Signed-off-by: Omar Sandoval <osandov@osandov.com>
2022-12-13 17:46:37 -08:00
..
drgnpy.h drgn.helpers.linux: add proper XArray helpers 2022-12-13 17:46:37 -08:00
error.c Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
helpers.c drgn.helpers.linux: add proper XArray helpers 2022-12-13 17:46:37 -08:00
language.c Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
main.c drgn.helpers.linux: add proper XArray helpers 2022-12-13 17:46:37 -08:00
object.c libdrgn: python: add PyLong_From* and PyLong_As* wrappers for stdint.h types 2022-12-05 16:06:22 -08:00
platform.c Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
program.c libdrgn: python: fix path_arg leaks in Program_find_{type,object} 2022-12-06 13:25:55 -08:00
stack_trace.c libdrgn: python: add PyLong_From* and PyLong_As* wrappers for stdint.h types 2022-12-05 16:06:22 -08:00
symbol.c libdrgn: python: add PyLong_From* and PyLong_As* wrappers for stdint.h types 2022-12-05 16:06:22 -08:00
test.c Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
thread.c libdrgn: python: add PyLong_From* and PyLong_As* wrappers for stdint.h types 2022-12-05 16:06:22 -08:00
type.c libdrgn: python: add PyLong_From* and PyLong_As* wrappers for stdint.h types 2022-12-05 16:06:22 -08:00
util.c libdrgn: python: simplify path_converter() 2022-12-06 10:49:00 -08:00