Lines Matching refs:thread
46 Ebl *ebl = state->thread->process->ebl; in state_fetch_pc()
73 Dwfl_Thread *thread = state->thread; in state_free() local
74 assert (thread->unwound == state); in state_free()
75 thread->unwound = state->unwound; in state_free()
80 thread_free_all_states (Dwfl_Thread *thread) in thread_free_all_states() argument
82 while (thread->unwound) in thread_free_all_states()
83 state_free (thread->unwound); in thread_free_all_states()
87 state_alloc (Dwfl_Thread *thread) in state_alloc() argument
89 assert (thread->unwound == NULL); in state_alloc()
90 Ebl *ebl = thread->process->ebl; in state_alloc()
98 state->thread = thread; in state_alloc()
103 thread->unwound = state; in state_alloc()
231 dwfl_thread_dwfl (Dwfl_Thread *thread) in INTDEF()
233 return thread->process->dwfl; in INTDEF()
238 dwfl_thread_tid (Dwfl_Thread *thread) in INTDEF()
240 return thread->tid; in INTDEF()
247 return state->thread; in INTDEF()
252 dwfl_getthreads (Dwfl *dwfl, int (*callback) (Dwfl_Thread *thread, void *arg), in INTDEF()
268 Dwfl_Thread thread; in INTDEF() local
269 thread.process = process; in INTDEF()
270 thread.unwound = NULL; in INTDEF()
271 thread.callbacks_arg = NULL; in INTDEF()
274 thread.tid = process->callbacks->next_thread (dwfl, in INTDEF()
276 &thread.callbacks_arg); in INTDEF()
277 if (thread.tid < 0) in INTDEF()
280 thread_free_all_states (&thread); in INTDEF()
284 if (thread.tid == 0) in INTDEF()
286 thread_free_all_states (&thread); in INTDEF()
290 int err = callback (&thread, arg); in INTDEF()
293 thread_free_all_states (&thread); in INTDEF()
296 assert (thread.unwound == NULL); in INTDEF()
306 int (*callback) (Dwfl_Thread *thread, void *arg);
312 get_one_thread_cb (Dwfl_Thread *thread, void *arg) in get_one_thread_cb() argument
315 if (! oa->seen && INTUSE(dwfl_thread_tid) (thread) == oa->tid) in get_one_thread_cb()
318 oa->ret = oa->callback (thread, oa->arg); in get_one_thread_cb()
329 int (*callback) (Dwfl_Thread *thread, void *arg), in getthread()
347 Dwfl_Thread thread; in getthread() local
348 thread.process = process; in getthread()
349 thread.unwound = NULL; in getthread()
350 thread.callbacks_arg = NULL; in getthread()
353 &thread.callbacks_arg)) in getthread()
356 thread.tid = tid; in getthread()
357 err = callback (&thread, arg); in getthread()
358 thread_free_all_states (&thread); in getthread()
389 get_one_thread_frames_cb (Dwfl_Thread *thread, void *arg) in get_one_thread_frames_cb() argument
392 return INTUSE(dwfl_thread_getframes) (thread, ot->callback, ot->arg); in get_one_thread_frames_cb()
406 dwfl_thread_getframes (Dwfl_Thread *thread, in INTDEF()
410 if (thread->unwound != NULL) in INTDEF()
416 Ebl *ebl = thread->process->ebl; in INTDEF()
422 if (state_alloc (thread) == NULL) in INTDEF()
427 Dwfl_Process *process = thread->process; in INTDEF()
428 if (! process->callbacks->set_initial_registers (thread, in INTDEF()
429 thread->callbacks_arg)) in INTDEF()
431 thread_free_all_states (thread); in INTDEF()
434 if (! state_fetch_pc (thread->unwound)) in INTDEF()
437 process->callbacks->thread_detach (thread, thread->callbacks_arg); in INTDEF()
438 thread_free_all_states (thread); in INTDEF()
445 state = thread->unwound; in INTDEF()
450 process->callbacks->thread_detach (thread, thread->callbacks_arg); in INTDEF()
451 thread_free_all_states (thread); in INTDEF()
456 state_free (thread->unwound); in INTDEF()
457 state = thread->unwound; in INTDEF()
463 process->callbacks->thread_detach (thread, thread->callbacks_arg); in INTDEF()
466 thread_free_all_states (thread); in INTDEF()
471 thread_free_all_states (thread); in INTDEF()