drgn/libdrgn
Omar Sandoval f20b41c8c0 Allow naming and configuring order of symbol finders
Currently, the bare-bones add_symbol_finder() interface only allows
adding a symbol finder that is called before any existing finders. It'd
be useful to be able to specify the order that symbol finders should be
called in and to selectively enable and disable them. To do that, we
also need finders to have a name to identify them by. So, replace
add_symbol_finder() (which hasn't been in a release yet) with a set of
interfaces providing this flexibility: register_symbol_finder(),
set_enabled_symbol_finders(), registered_symbol_finders(), and
enabled_symbol_finders(). Also change the callback signature to take the
program.

In particular, this flexibility will be very useful for a plugin system:
pre-installed plugins can register symbol finders that the user can
choose to enable or disable.

Signed-off-by: Omar Sandoval <osandov@osandov.com>
2024-06-05 13:40:26 -07:00
..
build-aux Add scaffolding for libdrgn C unit tests 2024-04-26 14:53:53 -07:00
examples libdrgn: examples: load_debug_info: fix build due to headers not being found 2024-05-02 01:07:40 -07:00
include libdrgn: wrap system elf.h instead of vendoring 2023-08-24 13:27:38 -07:00
m4 libdrgn: pp: make PP_NARGS() expand to 0 2024-04-26 14:53:53 -07:00
python Allow naming and configuring order of symbol finders 2024-06-05 13:40:26 -07:00
tests Translate path_iterator tests to C unit tests 2024-04-26 14:53:53 -07:00
.gitignore libdrgn: use memswitch for linux_kernel_object_find 2022-02-08 02:03:11 -08:00
arch_aarch64_defs.py Add StackFrame.sp 2022-11-22 18:47:16 -08:00
arch_aarch64.c libdrgn: aarch64: Apply TBI to virtual addresses 2024-01-16 13:11:50 -08:00
arch_arm.c Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
arch_i386.c Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
arch_ppc64_defs.py Add StackFrame.sp 2022-11-22 18:47:16 -08:00
arch_ppc64.c libdrgn: ppc64: use DRGN_ERROR_NOT_IMPLEMENTED when virtual address translation is not supported 2024-03-20 15:21:25 -07:00
arch_riscv.c Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
arch_s390x_defs.py libdrgn: add s390x unwinding support 2022-12-19 13:48:44 -08:00
arch_s390x.c libdrgn: add DRGN_OBJECT scope guard 2023-09-28 22:31:11 -07:00
arch_x86_64_defs.py Add StackFrame.sp 2022-11-22 18:47:16 -08:00
arch_x86_64.c libdrgn: x86_64: avoid recursive address translation for swapper_pg_dir 2024-05-30 11:56:23 -07:00
array.h libdrgn: factor is_array() macro out of array_size() 2024-01-04 14:42:59 -08:00
binary_buffer.c Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
binary_buffer.h Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
binary_search_tree.h libdrgn: binary_search_tree: use a slightly different terminating loop hack 2023-09-13 15:53:11 -07:00
bitops.h libdrgn: bitops: add ilog2() 2023-11-02 16:26:19 -07:00
c_lexer.h Translate C lexer tests to C unit tests 2024-04-26 14:53:53 -07:00
cfi.c Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
cfi.h Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
cityhash.h Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
cleanup.h libdrgn: add _cleanup_fclose_ scope guard 2023-08-17 15:42:13 -07:00
configure.ac Add scaffolding for libdrgn C unit tests 2024-04-26 14:53:53 -07:00
debug_info.c Allow naming and configuring order of symbol finders 2024-06-05 13:40:26 -07:00
debug_info.h libdrgn: introduce Symbol Finder API 2024-03-11 16:43:43 -07:00
Doxyfile libdrgn: add read(2) and pread(2) wrappers that don't return short reads 2022-08-26 12:43:20 -07:00
drgn_program_parse_vmcoreinfo.inc.strswitch libdrgn: x86_64: avoid recursive address translation for swapper_pg_dir 2024-05-30 11:56:23 -07:00
drgn.h Allow naming and configuring order of symbol finders 2024-06-05 13:40:26 -07:00
dwarf_constants.c libdrgn: dwarf_info: expand unknown DWARF expression opcode 2023-09-28 11:56:11 -07:00
dwarf_constants.h libdrgn: dwarf_info: expand unknown DWARF expression opcode 2023-09-28 11:56:11 -07:00
dwarf_info.c libdrgn: support DWARF package (.dwp) files 2024-03-01 15:49:08 -08:00
dwarf_info.h libdrgn: dwarf_info: index type units from split DWARF files 2024-03-01 14:37:47 -08:00
elf_file.c libdrgn: elf_file: drop .debug_line and .debug_line_str 2023-10-11 15:07:28 -07:00
elf_file.h libdrgn: dwarf_info: read CU DIE with libdw in DWARF index 2023-07-19 10:10:08 -07:00
error.c libdrgn: string_builder: add STRING_BUILDER scope guard 2023-10-07 22:30:38 -07:00
error.h libdrgn: string_builder: add STRING_BUILDER scope guard 2023-10-07 22:30:38 -07:00
generics.h libdrgn: add macros for defining types conditionally 2023-08-16 14:13:54 -07:00
handler.c libdrgn: add interface for registering chains of named handlers 2024-06-05 13:40:26 -07:00
handler.h libdrgn: add interface for registering chains of named handlers 2024-06-05 13:40:26 -07:00
hash_table.c Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
hash_table.h libdrgn: hash_table: fix compilation error on old GCC 2024-04-17 16:45:11 -07:00
helpers.h libdrgn: rework linux_helper_task_iterator based on kernel's for_each_process_thread() 2023-11-18 10:23:50 -08:00
io.c Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
io.h Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
kdump.c libdrgn: add libkdumpfile RISC-V support 2024-05-30 11:56:23 -07:00
language_c.c Translate C lexer tests to C unit tests 2024-04-26 14:53:53 -07:00
language.c Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
language.h Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
lazy_object.c Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
lazy_object.h Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
lexer.c libdrgn: revamp generic vector API 2023-08-16 14:13:38 -07:00
lexer.h Translate C lexer tests to C unit tests 2024-04-26 14:53:53 -07:00
linux_kernel_helpers.c libdrgn: rework linux_helper_task_iterator based on kernel's for_each_process_thread() 2023-11-18 10:23:50 -08:00
linux_kernel_object_find.inc.strswitch Add VMCOREINFO to special Linux Kernel objects 2023-08-18 22:21:13 -07:00
linux_kernel.c Add DRGN_PROGRAM_IS_LOCAL flag 2023-10-06 16:09:58 -07:00
linux_kernel.h libdrgn: detect flattened vmcores and raise error 2023-08-16 09:41:26 -07:00
log.c libdrgn: add simple logging framework 2023-07-18 12:47:34 -07:00
log.h libdrgn: log: fix typos in drgn_error_log_{critical,error}() 2023-10-11 14:35:10 -07:00
Makefile.am libdrgn: add interface for registering chains of named handlers 2024-06-05 13:40:26 -07:00
memory_reader.c libdrgn: memory_reader: indicate when fault is for physical memory 2024-03-08 02:23:30 -08:00
memory_reader.h libdrgn: require semicolon after DEFINE_{HASH,VECTOR,BINARY_SEARCH_TREE}* 2023-08-02 14:54:59 -07:00
minmax.h libdrgn: get rid of compatible type requirement for {min,max}_iconst() 2023-08-16 14:12:11 -07:00
nstring.h Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
object_index.c libdrgn: embed type and object finders in drgn_debug_info 2023-09-29 12:00:31 -07:00
object_index.h libdrgn: embed type and object finders in drgn_debug_info 2023-09-29 12:00:31 -07:00
object.c libdrgn: allow reinterpreting primitive scalar values 2024-01-12 15:50:23 -08:00
object.h libdrgn: support value objects with >64-bit integer types 2023-08-02 14:21:46 -07:00
openmp.c libdrgn: set default number of OpenMP threads without hyperthreads 2023-08-18 08:33:56 -07:00
openmp.h libdrgn: set default number of OpenMP threads without hyperthreads 2023-08-18 08:33:56 -07:00
orc_info.c libdrgn: orc_info: don't assume ORC section alignment 2023-08-21 15:18:26 -07:00
orc_info.h libdrgn: orc_info: handle ORC changes in Linux 6.3 and 6.4 2023-06-22 15:27:39 -07:00
orc.h libdrgn: orc_info: handle ORC changes in Linux 6.3 and 6.4 2023-06-22 15:27:39 -07:00
path.c Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
path.h Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
platform.c libdrgn: add stub s390 and s390x architectures with relocation implementation 2022-12-19 13:48:44 -08:00
platform.h libdrgn: aarch64: Apply TBI to virtual addresses 2024-01-16 13:11:50 -08:00
pp.h libdrgn: pp: add PP_MAP() to call a macro on each variable argument 2024-04-26 14:53:53 -07:00
program.c Allow naming and configuring order of symbol finders 2024-06-05 13:40:26 -07:00
program.h Allow naming and configuring order of symbol finders 2024-06-05 13:40:26 -07:00
register_state.c libdrgn: embed drgn_debug_info in drgn_program 2023-10-02 11:27:36 -07:00
register_state.h libdrgn: add drgn_register_state_dup() 2023-08-24 16:05:23 -07:00
serialize.c Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
serialize.h libdrgn: support value objects with >64-bit integer types 2023-08-02 14:21:46 -07:00
splay_tree.c Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
stack_trace.c libdrgn: stack_trace: get DW_AT_frame_base from containing DW_TAG_subprogram DIE 2024-05-02 00:29:20 -07:00
stack_trace.h Relicense drgn from GPLv3+ to LGPLv2.1+ 2022-11-01 17:05:16 -07:00
string_builder.c libdrgn: string_builder: add STRING_BUILDER scope guard 2023-10-07 22:30:38 -07:00
string_builder.h libdrgn: string_builder: add STRING_BUILDER scope guard 2023-10-07 22:30:38 -07:00
symbol.c python: Add Program.add_symbol_finder() 2024-03-11 16:43:43 -07:00
symbol.h Allow naming and configuring order of symbol finders 2024-06-05 13:40:26 -07:00
type.c libdrgn: fix memory leak of type template parameters 2024-01-16 13:28:10 -08:00
type.h libdrgn: embed type and object finders in drgn_debug_info 2023-09-29 12:00:31 -07:00
util.h libdrgn: add malloc_flexible_array() macro 2024-01-04 14:42:59 -08:00
vector.h libdrgn: vector: fix vector_max_size 2024-04-07 09:53:33 -07:00