From e962ec3bcbe8eccdcded36aaafee7bec41fa1bc4 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Fri, 20 Dec 2013 10:09:12 +0100 Subject: 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 --- tests/backtrace-data.c | 1 + 1 file changed, 1 insertion(+) (limited to 'tests') diff --git a/tests/backtrace-data.c b/tests/backtrace-data.c index 6d213452..9fa3c4a9 100644 --- a/tests/backtrace-data.c +++ b/tests/backtrace-data.c @@ -205,6 +205,7 @@ set_initial_registers (Dwfl_Thread *thread, static const Dwfl_Thread_Callbacks callbacks = { next_thread, + NULL, /* get_thread */ memory_read, set_initial_registers, NULL, /* detach */ -- cgit v1.2.3