GDB (xrefs)
Classes | Macros | Typedefs | Enumerations | Functions | Variables
/tmp/gdb-7.10/gdb/gdbthread.h File Reference
#include "breakpoint.h"
#include "frame.h"
#include "ui-out.h"
#include "inferior.h"
#include "btrace.h"
#include "common/vec.h"

Go to the source code of this file.

Classes

struct  thread_control_state
 
struct  thread_suspend_state
 
struct  thread_info
 

Macros

#define ALL_NON_EXITED_THREADS(T)
 
#define ALL_THREADS_SAFE(T, TMP)
 

Typedefs

typedef struct valuevalue_ptr
 
typedef int(* thread_callback_func) (struct thread_info *, void *)
 

Enumerations

enum  thread_state { THREAD_STOPPED, THREAD_RUNNING, THREAD_EXITED }
 

Functions

 DEF_VEC_P (value_ptr)
 
typedef VEC (value_ptr) value_vec
 
void init_thread_list (void)
 
struct thread_infoadd_thread (ptid_t ptid)
 
struct thread_infoadd_thread_silent (ptid_t ptid)
 
struct thread_infoadd_thread_with_info (ptid_t ptid, struct private_thread_info *)
 
void delete_thread (ptid_t)
 
void delete_thread_silent (ptid_t)
 
void delete_step_resume_breakpoint (struct thread_info *)
 
void delete_exception_resume_breakpoint (struct thread_info *)
 
void delete_single_step_breakpoints (struct thread_info *tp)
 
int thread_has_single_step_breakpoints_set (struct thread_info *tp)
 
int thread_has_single_step_breakpoint_here (struct thread_info *tp, struct address_space *aspace, CORE_ADDR addr)
 
ptid_t thread_id_to_pid (int)
 
int pid_to_thread_id (ptid_t ptid)
 
int in_thread_list (ptid_t ptid)
 
int valid_thread_id (int thread)
 
struct thread_infofind_thread_ptid (ptid_t ptid)
 
struct thread_infofind_thread_id (int num)
 
struct thread_infofirst_thread_of_process (int pid)
 
struct thread_infoany_thread_of_process (int pid)
 
struct thread_infoany_live_thread_of_process (int pid)
 
void thread_change_ptid (ptid_t old_ptid, ptid_t new_ptid)
 
struct thread_infoiterate_over_threads (thread_callback_func, void *)
 
int thread_count (void)
 
void switch_to_thread (ptid_t ptid)
 
void set_running (ptid_t ptid, int running)
 
void set_stop_requested (ptid_t ptid, int stop)
 
int is_running (ptid_t ptid)
 
int is_exited (ptid_t ptid)
 
int is_stopped (ptid_t ptid)
 
void set_executing (ptid_t ptid, int executing)
 
int is_executing (ptid_t ptid)
 
int threads_are_executing (void)
 
void finish_thread_state (ptid_t ptid)
 
void finish_thread_state_cleanup (void *ptid_p)
 
void thread_command (char *tidstr, int from_tty)
 
void print_thread_info (struct ui_out *uiout, char *threads, int pid)
 
struct cleanupmake_cleanup_restore_current_thread (void)
 
struct thread_infoinferior_thread (void)
 
void update_thread_list (void)
 
void prune_threads (void)
 
void delete_exited_threads (void)
 
int pc_in_thread_step_range (CORE_ADDR pc, struct thread_info *thread)
 
struct cleanupenable_thread_stack_temporaries (ptid_t ptid)
 
int thread_stack_temporaries_enabled_p (ptid_t ptid)
 
void push_thread_stack_temporary (ptid_t ptid, struct value *v)
 
struct valueget_last_thread_stack_temporary (ptid_t)
 
int value_in_thread_stack_temporaries (struct value *, ptid_t)
 

Variables

struct cmd_list_elementthread_cmd_list
 
int print_thread_events
 
struct thread_infothread_list
 

Macro Definition Documentation

#define ALL_NON_EXITED_THREADS (   T)
#define ALL_THREADS_SAFE (   T,
  TMP 
)
Value:
for ((T) = thread_list; \
(T) != NULL ? ((TMP) = (T)->next, 1): 0; \
(T) = (TMP))
struct thread_info * thread_list
Definition: thread.c:55

Definition at line 383 of file gdbthread.h.

Referenced by delete_exited_threads(), follow_exec(), prune_threads(), and remote_update_thread_list().

Typedef Documentation

typedef int(* thread_callback_func) (struct thread_info *, void *)

Definition at line 371 of file gdbthread.h.

typedef struct value* value_ptr

Definition at line 162 of file gdbthread.h.

Enumeration Type Documentation

Enumerator
THREAD_STOPPED 
THREAD_RUNNING 
THREAD_EXITED 

Definition at line 35 of file gdbthread.h.

Function Documentation

struct thread_info* add_thread ( ptid_t  ptid)
struct thread_info* add_thread_silent ( ptid_t  ptid)
struct thread_info* add_thread_with_info ( ptid_t  ptid,
struct private_thread_info  
)
struct thread_info* any_live_thread_of_process ( int  pid)
struct thread_info* any_thread_of_process ( int  pid)
DEF_VEC_P ( value_ptr  )
void delete_exception_resume_breakpoint ( struct thread_info )
void delete_exited_threads ( void  )
void delete_single_step_breakpoints ( struct thread_info tp)
void delete_step_resume_breakpoint ( struct thread_info )
void delete_thread ( ptid_t  )
void delete_thread_silent ( ptid_t  )
struct cleanup* enable_thread_stack_temporaries ( ptid_t  ptid)
struct thread_info* find_thread_id ( int  num)
struct thread_info* find_thread_ptid ( ptid_t  ptid)

Definition at line 393 of file thread.c.

References thread_info::next, thread_info::ptid, and ptid_equal().

Referenced by add_thread_silent(), aix_thread_fetch_registers(), aix_thread_resume(), aix_thread_store_registers(), append_resumption(), attach_thread(), bpstat_clear_actions(), continue_command(), darwin_check_new_threads(), delete_checkpoint_command(), demand_private_info(), detach_thread(), disable_thread_stack_temporaries(), displaced_step_prepare(), do_restore_current_thread_cleanup(), enable_thread_stack_temporaries(), exit_lwp(), find_new_threads_callback(), finish_thread_state(), follow_fork(), get_last_thread_stack_temporary(), get_pending_status(), handle_inferior_event_1(), inferior_thread(), infrun_thread_stop_requested_callback(), is_executing(), is_thread_state(), linux_nat_resume_callback(), linux_nat_stop_lwp(), maint_btrace_clear_cmd(), maint_btrace_clear_packet_history_cmd(), maint_btrace_packet_history_cmd(), maint_info_btrace_cmd(), make_cleanup_restore_current_thread(), mi_on_resume(), procfs_update_thread_list(), program_info(), push_thread_stack_temporary(), python_on_normal_stop(), ravenscar_add_thread(), ravenscar_update_inferior_ptid(), record_btrace_fetch_registers(), record_btrace_find_resume_thread(), record_btrace_find_thread_to_move(), record_btrace_frame_sniffer(), record_btrace_info(), record_btrace_tailcall_frame_sniffer(), record_btrace_thread_alive(), remote_core_of_thread(), remote_detach_1(), remote_threads_extra_info(), require_btrace_thread(), restore_current_thread_cleanup_dtor(), run_inferior_call(), set_executing(), set_running(), set_stop_requested(), task_command_1(), thread_change_ptid(), thread_db_get_thread_local_address(), thread_db_pid_to_str(), thread_from_lwp(), thread_id_make_value(), thread_stack_temporaries_enabled_p(), and value_in_thread_stack_temporaries().

void finish_thread_state ( ptid_t  ptid)
void finish_thread_state_cleanup ( void *  ptid_p)
struct thread_info* first_thread_of_process ( int  pid)

Definition at line 497 of file thread.c.

References thread_info::next, thread_info::num, thread_info::ptid, and ptid_get_pid().

Referenced by core_open(), and extended_remote_attach().

struct value* get_last_thread_stack_temporary ( ptid_t  )
int in_thread_list ( ptid_t  ptid)
struct thread_info* inferior_thread ( void  )

Definition at line 85 of file thread.c.

References find_thread_ptid(), gdb_assert, and inferior_ptid.

Referenced by any_live_thread_of_process(), any_thread_of_process(), arm_linux_copy_svc(), attach_command_post_wait(), bpstat_do_actions(), breakpoint_about_to_proceed(), call_function_by_hand_dummy(), clear_proceed_status(), displaced_step_fixup(), do_initial_windows_stuff(), do_target_resume(), find_thread_needs_step_over(), finish_backward(), finish_command(), finish_command_continuation(), finish_forward(), follow_exec(), follow_fork(), follow_fork_inferior(), follow_inferior_reset_breakpoints(), for_each_just_stopped_thread(), handle_inferior_event_1(), inferior_event_handler(), infrun_thread_stop_requested_callback(), insert_exception_resume_breakpoint(), insert_exception_resume_from_probe(), insert_longjmp_resume_breakpoint(), insert_single_step_breakpoint(), insert_step_resume_breakpoint_at_sal_1(), linux_child_follow_fork(), mi_about_to_proceed(), mi_execute_command(), mi_on_normal_stop(), mi_on_resume(), normal_stop(), print_signal_received_reason(), print_stop_event(), proceed(), python_on_normal_stop(), queue_signal_command(), record_btrace_stopped_by_hw_breakpoint(), record_btrace_stopped_by_sw_breakpoint(), record_full_resume(), remote_follow_fork(), restore_infcall_control_state(), restore_infcall_suspend_state(), resume(), resume_cleanups(), save_infcall_control_state(), save_infcall_suspend_state(), set_step_frame(), set_step_info(), signal_command(), spu_skip_standalone_loader(), step_1(), step_1_continuation(), step_once(), thread_name_command(), until_break_command(), and until_next_command().

void init_thread_list ( void  )
int is_executing ( ptid_t  ptid)
int is_exited ( ptid_t  ptid)
int is_running ( ptid_t  ptid)
int is_stopped ( ptid_t  ptid)
struct thread_info* iterate_over_threads ( thread_callback_func  ,
void *   
)
struct cleanup* make_cleanup_restore_current_thread ( void  )
int pc_in_thread_step_range ( CORE_ADDR  pc,
struct thread_info thread 
)
int pid_to_thread_id ( ptid_t  ptid)
void print_thread_info ( struct ui_out uiout,
char *  threads,
int  pid 
)
void prune_threads ( void  )
void push_thread_stack_temporary ( ptid_t  ptid,
struct value v 
)
void set_executing ( ptid_t  ptid,
int  executing 
)
void set_running ( ptid_t  ptid,
int  running 
)
void set_stop_requested ( ptid_t  ptid,
int  stop 
)
void switch_to_thread ( ptid_t  ptid)
void thread_change_ptid ( ptid_t  old_ptid,
ptid_t  new_ptid 
)
void thread_command ( char *  tidstr,
int  from_tty 
)
int thread_count ( void  )
int thread_has_single_step_breakpoint_here ( struct thread_info tp,
struct address_space aspace,
CORE_ADDR  addr 
)
int thread_has_single_step_breakpoints_set ( struct thread_info tp)
ptid_t thread_id_to_pid ( int  )

Definition at line 471 of file thread.c.

References find_thread_id(), pid_to_ptid(), and thread_info::ptid.

Referenced by set_sig_thread_cmd(), and value_of_root_1().

int thread_stack_temporaries_enabled_p ( ptid_t  ptid)
int threads_are_executing ( void  )

Definition at line 880 of file thread.c.

References threads_executing.

Referenced by breakpoints_should_be_inserted_now().

void update_thread_list ( void  )
int valid_thread_id ( int  thread)
int value_in_thread_stack_temporaries ( struct value ,
ptid_t   
)
typedef VEC ( value_ptr  )

Variable Documentation

int print_thread_events

Definition at line 1653 of file thread.c.

Referenced by add_thread_with_info(), exit_lwp(), procfs_wait(), and windows_delete_thread().

struct cmd_list_element* thread_cmd_list

Definition at line 1755 of file thread.c.

struct thread_info* thread_list

Definition at line 55 of file thread.c.

Referenced by darwin_check_new_threads(), new_thread(), and remote_start_remote().