GDBserver
Classes | Macros | Functions | Variables
inferiors.h File Reference

Go to the source code of this file.

Classes

struct  inferior_list
 
struct  inferior_list_entry
 
struct  process_info
 

Macros

#define ptid_of(inf)   ((inf)->entry.id)
 
#define pid_of(inf)   ptid_get_pid ((inf)->entry.id)
 
#define lwpid_of(inf)   ptid_get_lwp ((inf)->entry.id)
 
#define A_I_NEXT(type, list, cur)
 
#define ALL_INFERIORS_TYPE(type, list, cur, tmp)
 
#define ALL_INFERIORS(list, cur, tmp)   ALL_INFERIORS_TYPE (struct inferior_list_entry, list, cur, tmp)
 
#define ALL_PROCESSES(cur, tmp)   ALL_INFERIORS_TYPE (struct process_info, &all_processes, cur, tmp)
 

Functions

struct process_infocurrent_process (void)
 
struct process_infoget_thread_process (struct thread_info *)
 
void add_inferior_to_list (struct inferior_list *list, struct inferior_list_entry *new_inferior)
 
void for_each_inferior (struct inferior_list *list, void(*action)(struct inferior_list_entry *))
 
void for_each_inferior_with_data (struct inferior_list *list, void(*action)(struct inferior_list_entry *, void *), void *data)
 
void clear_inferior_list (struct inferior_list *list)
 
int one_inferior_p (struct inferior_list *list)
 
void remove_inferior (struct inferior_list *list, struct inferior_list_entry *entry)
 
struct inferior_list_entryget_first_inferior (struct inferior_list *list)
 
struct process_infoadd_process (int pid, int attached)
 
void remove_process (struct process_info *process)
 
struct process_infofind_process_pid (int pid)
 
int have_started_inferiors_p (void)
 
int have_attached_inferiors_p (void)
 
ptid_t thread_to_gdb_id (struct thread_info *)
 
ptid_t gdb_id_to_thread_id (ptid_t)
 
void clear_inferiors (void)
 
struct inferior_list_entryfind_inferior (struct inferior_list *, int(*func)(struct inferior_list_entry *, void *), void *arg)
 
struct inferior_list_entryfind_inferior_id (struct inferior_list *list, ptid_t id)
 
void * inferior_target_data (struct thread_info *)
 
void set_inferior_target_data (struct thread_info *, void *)
 
void * inferior_regcache_data (struct thread_info *)
 
void set_inferior_regcache_data (struct thread_info *, void *)
 

Variables

struct inferior_list all_processes
 
struct thread_infocurrent_thread
 

Macro Definition Documentation

#define A_I_NEXT (   type,
  list,
  cur 
)
Value:
((cur) != NULL \
? (type *) ((struct inferior_list_entry *) cur)->next \
: NULL)
Definition: inferiors.h:29

Definition at line 104 of file inferiors.h.

#define ALL_INFERIORS (   list,
  cur,
  tmp 
)    ALL_INFERIORS_TYPE (struct inferior_list_entry, list, cur, tmp)

Definition at line 117 of file inferiors.h.

Referenced by num_lwps().

#define ALL_INFERIORS_TYPE (   type,
  list,
  cur,
  tmp 
)
Value:
for ((cur) = (type *) (list)->head, (tmp) = A_I_NEXT (type, list, cur); \
(cur) != NULL; \
(cur) = (tmp), (tmp) = A_I_NEXT (type, list, cur))
#define A_I_NEXT(type, list, cur)
Definition: inferiors.h:104

Definition at line 111 of file inferiors.h.

#define ALL_PROCESSES (   cur,
  tmp 
)    ALL_INFERIORS_TYPE (struct process_info, &all_processes, cur, tmp)

Definition at line 121 of file inferiors.h.

Referenced by check_zombie_leaders().

#define lwpid_of (   inf)    ptid_get_lwp ((inf)->entry.id)
#define pid_of (   inf)    ptid_get_pid ((inf)->entry.id)
#define ptid_of (   inf)    ((inf)->entry.id)

Function Documentation

void add_inferior_to_list ( struct inferior_list list,
struct inferior_list_entry new_inferior 
)

Definition at line 33 of file inferiors.c.

References inferior_list::head, inferior_list_entry::next, and inferior_list::tail.

Referenced by add_process(), add_thread(), and loaded_dll().

struct process_info* add_process ( int  pid,
int  attached 
)
void clear_inferior_list ( struct inferior_list list)

Definition at line 256 of file inferiors.c.

References inferior_list::head, and inferior_list::tail.

Referenced by clear_dlls(), and clear_inferiors().

void clear_inferiors ( void  )
struct process_info* current_process ( void  )

Definition at line 356 of file inferiors.c.

References gdb_assert, and get_thread_process().

Referenced by aarch64_arch_setup(), aarch64_get_debug_reg_state(), any_persistent_commands(), arm_arch_setup(), arm_insert_point(), arm_remove_point(), attach_thread(), bfin_arch_setup(), breakpoint_here(), breakpoint_inserted_here(), check_breakpoints(), check_mem_read(), check_mem_write(), cris_arch_setup(), current_target_desc(), delete_all_breakpoints(), delete_breakpoint(), delete_disabled_breakpoints(), delete_fast_tracepoint_jump(), delete_reinsert_breakpoints(), find_enabled_raw_code_breakpoint_at(), find_fast_tracepoint_jump_at(), find_gdb_breakpoint(), find_new_threads_callback(), find_one_thread(), find_raw_breakpoint_at(), handle_query(), hardware_breakpoint_inserted_here(), ia64_arch_setup(), linux_look_up_symbols(), linux_qxfer_libraries_svr4(), linux_wait_1(), look_up_one_symbol(), lynx_resume(), m32r_arch_setup(), m68k_arch_setup(), mips_arch_setup(), mips_cannot_fetch_register(), mips_cannot_store_register(), mips_insert_point(), mips_remove_point(), mips_stopped_by_watchpoint(), mips_stopped_data_address(), nios2_arch_setup(), ppc_arch_setup(), ppc_cannot_store_register(), ppc_get_hwcap(), reinsert_all_breakpoints(), reinsert_breakpoints_at(), s390_arch_setup(), s390_regs_info(), set_breakpoint(), set_fast_tracepoint_jump(), set_raw_breakpoint_at(), sh_arch_setup(), software_breakpoint_inserted_here(), sparc_arch_setup(), thread_db_create_event(), thread_db_enable_reporting(), thread_db_find_new_threads(), thread_db_init(), thread_db_look_up_one_symbol(), thread_db_look_up_symbols(), tic6x_arch_setup(), tile_arch_setup(), try_thread_db_load_1(), uninsert_all_breakpoints(), uninsert_breakpoints_at(), validate_breakpoints(), x86_arch_setup(), x86_insert_point(), x86_remove_point(), x86_stopped_by_watchpoint(), x86_stopped_data_address(), and xtensa_arch_setup().

struct inferior_list_entry* find_inferior ( struct inferior_list ,
int(*)(struct inferior_list_entry *, void *)  func,
void *  arg 
)
struct inferior_list_entry* find_inferior_id ( struct inferior_list list,
ptid_t  id 
)
struct process_info* find_process_pid ( int  pid)
void for_each_inferior ( struct inferior_list list,
void(*)(struct inferior_list_entry *)  action 
)
void for_each_inferior_with_data ( struct inferior_list list,
void(*)(struct inferior_list_entry *, void *)  action,
void *  data 
)
ptid_t gdb_id_to_thread_id ( ptid_t  )

Definition at line 147 of file inferiors.c.

References thread_info::entry, find_thread_ptid(), inferior_list_entry::id, and null_ptid.

Referenced by process_serial_event().

struct inferior_list_entry* get_first_inferior ( struct inferior_list list)

Definition at line 177 of file inferiors.c.

References inferior_list::head.

Referenced by get_first_thread(), handle_query(), and handle_status().

struct process_info* get_thread_process ( struct thread_info )
int have_attached_inferiors_p ( void  )

Definition at line 342 of file inferiors.c.

References all_processes, attached_inferior_callback(), and find_inferior().

Referenced by detach_or_kill_for_exit().

int have_started_inferiors_p ( void  )

Definition at line 323 of file inferiors.c.

References all_processes, find_inferior(), and started_inferior_callback().

Referenced by detach_or_kill_for_exit().

void* inferior_regcache_data ( struct thread_info )
void* inferior_target_data ( struct thread_info )
int one_inferior_p ( struct inferior_list list)

Definition at line 248 of file inferiors.c.

References inferior_list::head, and inferior_list::tail.

Referenced by child_delete_thread().

void remove_inferior ( struct inferior_list list,
struct inferior_list_entry entry 
)
void remove_process ( struct process_info process)
void set_inferior_regcache_data ( struct thread_info ,
void *   
)

Definition at line 240 of file inferiors.c.

References thread_info::regcache_data.

Referenced by free_register_cache_thread(), and get_thread_regcache().

void set_inferior_target_data ( struct thread_info ,
void *   
)

Definition at line 228 of file inferiors.c.

References thread_info::target_data.

ptid_t thread_to_gdb_id ( struct thread_info )

Variable Documentation

struct inferior_list all_processes
struct thread_info* current_thread

Definition at line 28 of file inferiors.c.

Referenced by aarch64_arch_setup(), aarch64_notify_debug_reg_change(), aarch64_stopped_data_address(), arm_breakpoint_at(), arm_read_description(), arm_reinsert_addr(), arm_stopped_by_watchpoint(), arm_stopped_data_address(), attach_inferior(), check_gdb_bp_preconditions(), check_stopped_by_breakpoint(), check_stopped_by_watchpoint(), cmd_qtinit(), cmd_qtminftpilen(), cris_insert_point(), cris_reinsert_addr(), cris_remove_point(), cris_stopped_by_watchpoint(), cris_stopped_data_address(), current_lwp_ptid(), current_target_desc(), disable_thread_event_reporting(), gdb_agent_about_to_close(), gdb_condition_true_at_breakpoint_z_type(), get_child_debug_event(), get_pc(), get_thread_regcache(), handle_qxfer_exec_file(), handle_target_event(), input_interrupt(), linux_low_filter_event(), linux_qxfer_libraries_svr4(), linux_qxfer_spu(), linux_read_auxv(), linux_read_memory(), linux_resume_one_lwp_throw(), linux_stabilize_threads(), linux_stopped_by_hw_breakpoint(), linux_stopped_by_sw_breakpoint(), linux_stopped_by_watchpoint(), linux_stopped_data_address(), linux_wait_1(), linux_wait_for_event_filtered(), linux_write_memory(), linux_xfer_siginfo(), lynx_fetch_registers(), lynx_read_memory(), lynx_request_interrupt(), lynx_resume(), lynx_store_registers(), lynx_wait_1(), lynx_write_memory(), maybe_move_out_of_jump_pad(), mips_insert_point(), mips_read_description(), mips_reinsert_addr(), mips_stopped_by_watchpoint(), mips_stopped_data_address(), move_out_of_jump_pad_callback(), need_step_over_p(), nios2_reinsert_addr(), nto_fetch_registers(), nto_stopped_by_watchpoint(), nto_stopped_data_address(), nto_store_registers(), prepare_resume_reply(), process_serial_event(), ps_getpid(), ps_lgetregs(), putpkt_binary_1(), regcache_invalidate(), regcache_invalidate_thread(), remove_thread_event_breakpoints(), resume(), run_breakpoint_commands_z_type(), s390_arch_setup(), set_desired_thread(), sparc_reinsert_addr(), start_inferior(), start_step_over(), switch_to_process(), thread_db_create_event(), thread_db_get_tls_address(), thread_still_has_status_pending_p(), tile_arch_setup(), update_registers_callback(), wait_for_sigstop(), win32_get_current_dr(), win32_wait(), x86_arch_setup_process_callback(), x86_dr_low_set_addr(), x86_dr_low_set_control(), x86_linux_read_description(), x86_linux_update_xmltarget(), and x86_siginfo_fixup().