[PATCH v2 06/12] libdwfl [6/12]: Elf* caching via dwfl_process_tracker

Christian Hergert chergert@redhat.com
Tue Apr 15 18:15:29 GMT 2025


On 4/15/25 09:12, Serhei Makarov wrote:
> Option 2: expose one function, treat file_name and fd as optional input parameters.
> 
> // normal use case
> module_name = "/usr/lib/whatever.so"; /* name of module */
> file_name = "/proc/PID/root/usr/lib/whatever.so"; /* actual location of module */
> dwfl_process_tracker_find_cached_elf (tracker, module_name, &file_name, &elf, &fd);
> /* Since file_name is specified, the dwfl_process_tracker
>     will access the module at file_name, and cache by
>     module_name + dev + ino. */

What allocator owns `file_name`? Can they be const in both directions? 
Is ownership of FD transferred to `dup()`d?

-- Christian



More information about the Elfutils-devel mailing list