]> git.ipfire.org Git - thirdparty/elfutils.git/commit
libdwfl: Add dwfl_getthread_frames.
authorMark Wielaard <mjw@redhat.com>
Fri, 20 Dec 2013 09:09:12 +0000 (10:09 +0100)
committerMark Wielaard <mjw@redhat.com>
Mon, 23 Dec 2013 21:57:22 +0000 (22:57 +0100)
commite962ec3bcbe8eccdcded36aaafee7bec41fa1bc4
treed250cd9aecff3f8e539b301398027b1fc0a25c46
parentb6ef1ce4695cea00d097c7fcac8d0014ff01a5bf
libdwfl: Add dwfl_getthread_frames.

dwfl_getthread_frames is a convenience function for when the user is only
interested in one specific thread id of a process. It can be implemented by
a simple wrapper function that removes an extra callback layer just to
filter on thread id. But it also provides an optimized path to getting
access to just one particular Dwfl_Thread of the Dwfl process by providing
and (optional) new callback for the state provider. The pid_thread_callbacks
now provide an (optional) pid_getthread that doesn't need to travers all
threads anymore. Which is implemented for the linux-pid-attach provider.

stack now uses this to implement a new '-1' option that shows just one
specific thread of a process.

Signed-off-by: Mark Wielaard <mjw@redhat.com>
13 files changed:
ChangeLog
NEWS
libdw/ChangeLog
libdw/libdw.map
libdwfl/ChangeLog
libdwfl/dwfl_frame.c
libdwfl/libdwfl.h
libdwfl/libdwflP.h
libdwfl/linux-core-attach.c
libdwfl/linux-pid-attach.c
src/ChangeLog
src/stack.c
tests/backtrace-data.c