GDB (xrefs)
Classes | Functions | Variables
/tmp/gdb-8.1/gdb/inferior.c File Reference
#include "defs.h"
#include "exec.h"
#include "inferior.h"
#include "target.h"
#include "command.h"
#include "completer.h"
#include "gdbcmd.h"
#include "gdbthread.h"
#include "ui-out.h"
#include "observer.h"
#include "gdbcore.h"
#include "symfile.h"
#include "environ.h"
#include "cli/cli-utils.h"
#include "continuations.h"
#include "arch-utils.h"
#include "target-descriptions.h"
#include "readline/tilde.h"
#include "progspace-and-thread.h"

Go to the source code of this file.

Classes

struct  delete_thread_of_inferior_arg
 

Functions

struct inferiorcurrent_inferior (void)
 
void set_current_inferior (struct inferior *inf)
 
struct inferioradd_inferior_silent (int pid)
 
struct inferioradd_inferior (int pid)
 
static int delete_thread_of_inferior (struct thread_info *tp, void *data)
 
void delete_inferior (struct inferior *todel)
 
static void exit_inferior_1 (struct inferior *inftoex, int silent)
 
void exit_inferior (int pid)
 
void exit_inferior_silent (int pid)
 
void exit_inferior_num_silent (int num)
 
void detach_inferior (int pid)
 
void inferior_appeared (struct inferior *inf, int pid)
 
void discard_all_inferiors (void)
 
struct inferiorfind_inferior_id (int num)
 
struct inferiorfind_inferior_pid (int pid)
 
struct inferiorfind_inferior_ptid (ptid_t ptid)
 
struct inferiorfind_inferior_for_program_space (struct program_space *pspace)
 
struct inferioriterate_over_inferiors (int(*callback)(struct inferior *, void *), void *data)
 
int valid_gdb_inferior_id (int num)
 
int pid_to_gdb_inferior_id (int pid)
 
int gdb_inferior_id_to_pid (int num)
 
int in_inferior_list (int pid)
 
int have_inferiors (void)
 
int number_of_live_inferiors (void)
 
int have_live_inferiors (void)
 
void prune_inferiors (void)
 
int number_of_inferiors (void)
 
static const char * inferior_pid_to_str (int pid)
 
void print_selected_inferior (struct ui_out *uiout)
 
static void print_inferior (struct ui_out *uiout, const char *requested_inferiors)
 
static void detach_inferior_command (const char *args, int from_tty)
 
static void kill_inferior_command (const char *args, int from_tty)
 
static void inferior_command (const char *args, int from_tty)
 
static void info_inferiors_command (const char *args, int from_tty)
 
static void remove_inferior_command (const char *args, int from_tty)
 
struct inferioradd_inferior_with_spaces (void)
 
static void add_inferior_command (const char *args, int from_tty)
 
static void clone_inferior_command (const char *args, int from_tty)
 
static void show_print_inferior_events (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
 
static struct valueinferior_id_make_value (struct gdbarch *gdbarch, struct internalvar *var, void *ignore)
 
void initialize_inferiors (void)
 

Variables

struct inferiorinferior_list = NULL
 
static int highest_inferior_num
 
static int print_inferior_events = 0
 
static struct inferiorcurrent_inferior_ = NULL
 
static const struct internalvar_funcs inferior_funcs
 

Function Documentation

◆ add_inferior()

struct inferior* add_inferior ( int  pid)

◆ add_inferior_command()

static void add_inferior_command ( const char *  args,
int  from_tty 
)
static

◆ add_inferior_silent()

struct inferior* add_inferior_silent ( int  pid)

◆ add_inferior_with_spaces()

struct inferior* add_inferior_with_spaces ( void  )

◆ clone_inferior_command()

static void clone_inferior_command ( const char *  args,
int  from_tty 
)
static

◆ current_inferior()

struct inferior* current_inferior ( void  )

Definition at line 58 of file inferior.c.

References current_inferior_.

Referenced by ada_build_task_list(), ada_exception_name_addr_1(), ada_exception_support_info_sniffer(), ada_exception_sym_name(), ada_get_task_info_from_ptid(), ada_get_tsd_from_tag(), ada_tasks_normal_stop_observer(), ada_unhandled_exception_name_addr_from_raise(), add_inferior_continuation(), add_to_thread_list(), alpha_heuristic_proc_start(), attach_command(), attach_post_wait(), BP_MANIPULATION(), bpfinishpy_detect_out_scope_cb(), catch_syscall_enabled(), child_terminal_inferior(), child_terminal_info(), child_terminal_init(), child_terminal_ours_1(), clear_proceed_status(), clone_inferior_command(), cmd_record_stop(), core_open(), ctrl_c_handler(), darwin_attach(), darwin_detach(), darwin_get_ada_task_ptid(), darwin_interrupt(), darwin_kill_inferior(), darwin_mourn_inferior(), darwin_ptrace_him(), darwin_solib_get_all_image_info_addr_at_init(), darwin_xfer_partial(), detach_breakpoints(), do_all_inferior_continuations(), do_attach(), do_initial_windows_stuff(), elf_gnu_ifunc_resolver_stop(), enable_break(), environment_info(), exec_file_locate_attach(), extended_remote_environment_support(), find_inferior_for_program_space(), follow_exec(), follow_fork_inferior(), frscm_get_frame_smob_arg_unsafe(), gdb_bfd_open(), gdbpy_selected_inferior(), gdbscm_newest_frame(), gdbscm_selected_frame(), gdbsim_close(), gdbsim_create_inferior(), gdbsim_files_info(), gdbsim_has_all_memory(), gdbsim_has_memory(), gdbsim_load(), gdbsim_mourn_inferior(), gdbsim_open(), gdbsim_wait(), gdbsim_xfer_memory(), get_auxv_inferior_data(), get_inferior_args(), get_inferior_cwd(), get_inferior_io_terminal(), get_linux_inferior_data(), get_other_inferior(), get_task_from_args(), gnu_attach(), go32_create_inferior(), handle_inferior_event_1(), handle_solib_event(), handle_vfork_child_exec_or_exit(), heuristic_proc_start(), inf_has_multiple_thread_cb(), inf_ptrace_attach(), inf_ptrace_files_info(), inferior_id_make_value(), inferior_process_group(), info_mach_exceptions_command(), info_mach_ports_command(), info_mach_region_command(), info_tasks_command(), insert_catch_syscall(), invalidate_auxv_cache(), iterate_over_live_ada_tasks(), jit_reader_unload_command(), linux_find_memory_regions_full(), linux_handle_extended_wait(), linux_info_proc(), linux_nat_filesystem_is_local(), linux_nat_kill(), linux_vsyscall_range_raw(), memory_xfer_auxv(), mi_cmd_ada_task_info(), mi_cmd_env_path(), mi_cmd_remove_inferior(), mi_output_solib_attribs(), mi_solib_unloaded(), new_tty_postfork(), notice_new_inferior(), nto_inferior_data(), parse_thread_id(), path_command(), path_info(), postfork_hook(), prepare_for_detach(), print_exited_reason(), print_inferior(), print_selected_inferior(), print_thread_info_1(), procfs_attach(), procfs_create_inferior(), procfs_files_info(), procfs_stopped_by_watchpoint(), read_known_tasks(), read_known_tasks_array(), read_known_tasks_list(), record_btrace_push_target(), record_full_open(), remote_add_inferior(), remove_catch_syscall(), restore_infcall_control_state(), resume_1(), run_command_1(), save_infcall_control_state(), save_stop_context(), scoped_restore_current_thread::scoped_restore_current_thread(), set_enable_mach_exceptions(), set_environment_command(), set_inferior_args(), set_inferior_args_vector(), set_inferior_cwd(), set_inferior_io_terminal(), set_sigint_trap(), set_target_gdbarch(), setup_inferior(), sim_command_completer(), simulator_command(), solib_aix_current_sos(), solib_aix_normal_stop_observer(), solib_aix_solib_create_inferior_hook(), solib_find_1(), solib_read_symbols(), spu_skip_standalone_loader(), start_remote(), stop_context_changed(), symbol_file_add_main_1(), target_gdbarch(), target_pre_inferior(), task_command(), tfile_open(), thread_apply_command(), unset_environment_command(), update_solib_list(), valid_task_id(), windows_files_info(), and write_memory_with_notification().

◆ delete_inferior()

void delete_inferior ( struct inferior todel)

◆ delete_thread_of_inferior()

static int delete_thread_of_inferior ( struct thread_info tp,
void *  data 
)
static

◆ detach_inferior()

void detach_inferior ( int  pid)

◆ detach_inferior_command()

static void detach_inferior_command ( const char *  args,
int  from_tty 
)
static

◆ discard_all_inferiors()

void discard_all_inferiors ( void  )

Definition at line 278 of file inferior.c.

References exit_inferior_silent(), arm-linux::inf, inferior_list, and inf::pid.

Referenced by remote_close().

◆ exit_inferior()

void exit_inferior ( int  pid)

◆ exit_inferior_1()

static void exit_inferior_1 ( struct inferior inftoex,
int  silent 
)
static

◆ exit_inferior_num_silent()

void exit_inferior_num_silent ( int  num)

Definition at line 249 of file inferior.c.

References exit_inferior_1(), find_inferior_id(), and inferior::num.

Referenced by follow_exec().

◆ exit_inferior_silent()

void exit_inferior_silent ( int  pid)

Definition at line 241 of file inferior.c.

References exit_inferior_1(), find_inferior_pid(), and pid.

Referenced by core_close(), discard_all_inferiors(), and tfile_close().

◆ find_inferior_for_program_space()

struct inferior* find_inferior_for_program_space ( struct program_space pspace)

◆ find_inferior_id()

struct inferior* find_inferior_id ( int  num)

◆ find_inferior_pid()

struct inferior* find_inferior_pid ( int  pid)

◆ find_inferior_ptid()

struct inferior* find_inferior_ptid ( ptid_t  ptid)

◆ gdb_inferior_id_to_pid()

int gdb_inferior_id_to_pid ( int  num)

Definition at line 386 of file inferior.c.

References find_inferior_id(), inferior::num, and inferior::pid.

Referenced by detach_inferior_command(), and kill_inferior_command().

◆ have_inferiors()

int have_inferiors ( void  )

◆ have_live_inferiors()

int have_live_inferiors ( void  )

◆ in_inferior_list()

int in_inferior_list ( int  pid)

Definition at line 396 of file inferior.c.

References arm-linux::inf, inferior_list, inf::pid, and pid.

Referenced by remote_notice_new_inferior().

◆ inferior_appeared()

void inferior_appeared ( struct inferior inf,
int  pid 
)

◆ inferior_command()

static void inferior_command ( const char *  args,
int  from_tty 
)
static

◆ inferior_id_make_value()

static struct value* inferior_id_make_value ( struct gdbarch gdbarch,
struct internalvar var,
void *  ignore 
)
static

Definition at line 948 of file inferior.c.

References current_inferior(), and value_from_longest().

◆ inferior_pid_to_str()

static const char* inferior_pid_to_str ( int  pid)
static

Definition at line 501 of file inferior.c.

References _, pid, pid_to_ptid(), and target_pid_to_str().

Referenced by print_inferior(), and print_selected_inferior().

◆ info_inferiors_command()

static void info_inferiors_command ( const char *  args,
int  from_tty 
)
static

Definition at line 721 of file inferior.c.

References current_uiout, and print_inferior().

Referenced by initialize_inferiors().

◆ initialize_inferiors()

void initialize_inferiors ( void  )

◆ iterate_over_inferiors()

struct inferior* iterate_over_inferiors ( int(*)(struct inferior *, void *)  callback,
void *  data 
)

◆ kill_inferior_command()

static void kill_inferior_command ( const char *  args,
int  from_tty 
)
static

◆ number_of_inferiors()

int number_of_inferiors ( void  )

Definition at line 486 of file inferior.c.

References arm-linux::inf, and inferior_list.

Referenced by print_one_breakpoint_location().

◆ number_of_live_inferiors()

int number_of_live_inferiors ( void  )

◆ pid_to_gdb_inferior_id()

int pid_to_gdb_inferior_id ( int  pid)

Definition at line 374 of file inferior.c.

References arm-linux::inf, inferior_list, inf::pid, and pid.

◆ print_inferior()

static void print_inferior ( struct ui_out uiout,
const char *  requested_inferiors 
)
static

◆ print_selected_inferior()

void print_selected_inferior ( struct ui_out uiout)

◆ prune_inferiors()

void prune_inferiors ( void  )

◆ remove_inferior_command()

static void remove_inferior_command ( const char *  args,
int  from_tty 
)
static

◆ set_current_inferior()

void set_current_inferior ( struct inferior inf)

◆ show_print_inferior_events()

static void show_print_inferior_events ( struct ui_file file,
int  from_tty,
struct cmd_list_element c,
const char *  value 
)
static

Definition at line 939 of file inferior.c.

References _, and fprintf_filtered().

Referenced by initialize_inferiors().

◆ valid_gdb_inferior_id()

int valid_gdb_inferior_id ( int  num)

Definition at line 362 of file inferior.c.

References arm-linux::inf, inferior_list, and inferior::num.

Referenced by detach_inferior_command(), and kill_inferior_command().

Variable Documentation

◆ current_inferior_

struct inferior* current_inferior_ = NULL
static

Definition at line 55 of file inferior.c.

Referenced by current_inferior(), initialize_inferiors(), and set_current_inferior().

◆ highest_inferior_num

int highest_inferior_num
static

Definition at line 46 of file inferior.c.

◆ inferior_funcs

const struct internalvar_funcs inferior_funcs
static
Initial value:
=
{
NULL,
NULL
}
static struct value * inferior_id_make_value(struct gdbarch *gdbarch, struct internalvar *var, void *ignore)
Definition: inferior.c:948

Definition at line 958 of file inferior.c.

Referenced by initialize_inferiors().

◆ inferior_list

struct inferior* inferior_list = NULL

◆ print_inferior_events

int print_inferior_events = 0
static

Definition at line 50 of file inferior.c.

Referenced by add_inferior(), detach_inferior(), exit_inferior(), and initialize_inferiors().