]> git.ipfire.org Git - thirdparty/elfutils.git/commit
libdwfl_stacktrace [9/12]: add dwflst_tracker_find_pid
authorSerhei Makarov <serhei@serhei.io>
Fri, 25 Apr 2025 14:55:51 +0000 (10:55 -0400)
committerAaron Merey <amerey@redhat.com>
Fri, 25 Apr 2025 15:55:20 +0000 (11:55 -0400)
commit2ba26ef4ac116934055fc95993c1e4e45f867fe7
treebafc6a705a43bfd2bdb5e908b1890ade0eb1f774
parent11f5f216a47ac174bc7c24d9dbf4878cb23f45ee
libdwfl_stacktrace [9/12]: add dwflst_tracker_find_pid

New function that retrieves the Dwfl for a particular PID, or,
if the Dwfl is absent, creates it via a provided callback
and adds it to the table later, when the PID is confirmed
via dwfl_attach_state.

* libdwfl_stacktrace/libdwfl_stacktrace.h (dwflst_tracker_find_pid):
  New function.
* libdwfl_stacktrace/dwfl_process_tracker.c (dwflst_tracker_find_pid):
  New function; find a Dwfl in the dwfltab or create one using the
  provided callback.  The newly created Dwfl will be added to the
  dwfltab automatically when its pid is confirmed by a call to
  dwfl_attach_state.
* libdw/libdw.map: Add dwflst_tracker_find_pid.

Signed-off-by: Serhei Makarov <serhei@serhei.io>
libdw/libdw.map
libdwfl_stacktrace/dwflst_process_tracker.c
libdwfl_stacktrace/libdwfl_stacktrace.h