|
GDB (xrefs)
|
#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 inferior * | current_inferior (void) |
| void | set_current_inferior (struct inferior *inf) |
| struct inferior * | add_inferior_silent (int pid) |
| struct inferior * | add_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 inferior * | find_inferior_id (int num) |
| struct inferior * | find_inferior_pid (int pid) |
| struct inferior * | find_inferior_ptid (ptid_t ptid) |
| struct inferior * | find_inferior_for_program_space (struct program_space *pspace) |
| struct inferior * | iterate_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 inferior * | add_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 value * | inferior_id_make_value (struct gdbarch *gdbarch, struct internalvar *var, void *ignore) |
| void | initialize_inferiors (void) |
Variables | |
| struct inferior * | inferior_list = NULL |
| static int | highest_inferior_num |
| static int | print_inferior_events = 0 |
| static struct inferior * | current_inferior_ = NULL |
| static const struct internalvar_funcs | inferior_funcs |
| struct inferior* add_inferior | ( | int | pid | ) |
Definition at line 121 of file inferior.c.
References _, add_inferior_silent(), arm-linux::inf, pid, print_inferior_events, and printf_unfiltered().
Referenced by add_inferior_with_spaces(), clone_inferior_command(), follow_fork_inferior(), initialize_inferiors(), and remote_add_inferior().
|
static |
Definition at line 793 of file inferior.c.
References _, add_inferior_with_spaces(), gdb::argv, error(), exec_file_attach(), gdb_argv::get(), null_ptid, parse_and_eval_long(), printf_filtered(), set_current_inferior(), set_current_program_space(), switch_to_thread(), symbol_file_add_main(), and SYMFILE_VERBOSE.
Referenced by initialize_inferiors().
| struct inferior* add_inferior_silent | ( | int | pid | ) |
Definition at line 97 of file inferior.c.
References arm-linux::inf, inferior::inferior(), inferior_appeared(), inferior_list, inferior::next, observer_notify_inferior_added(), and pid.
Referenced by add_inferior().
| struct inferior* add_inferior_with_spaces | ( | void | ) |
Definition at line 763 of file inferior.c.
References add_inferior(), add_program_space(), program_space::aspace, gdb_assert, gdbarch_find_by_info(), gdbarch_info_init(), arm-linux::inf, and maybe_new_address_space().
Referenced by add_inferior_command(), follow_exec(), and mi_cmd_add_inferior().
|
static |
Definition at line 855 of file inferior.c.
References _, add_inferior(), add_program_space(), inferior::args, gdb::argv, program_space::aspace, inferior::aspace, clone_program_space(), copy_inferior_target_desc_info(), current_inferior(), error(), find_inferior_id(), inferior::gdbarch, gdb_argv::get(), arm-linux::inf, maybe_new_address_space(), null_ptid, inferior::num, parse_and_eval_long(), printf_filtered(), inferior::pspace, set_current_inferior(), switch_to_thread(), and target_desc_info_from_user_p().
Referenced by initialize_inferiors().
| 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().
| void delete_inferior | ( | struct inferior * | todel | ) |
Definition at line 155 of file inferior.c.
References delete_program_space(), delete_thread_of_inferior(), arm-linux::inf, inferior_list, iterate_over_threads(), observer_notify_inferior_removed(), delete_thread_of_inferior_arg::pid, inf::pid, program_space_empty_p(), and delete_thread_of_inferior_arg::silent.
Referenced by mi_cmd_remove_inferior(), prune_inferiors(), and remove_inferior_command().
|
static |
Definition at line 138 of file inferior.c.
References delete_thread(), delete_thread_silent(), delete_thread_of_inferior_arg::pid, thread_info::ptid, ptid_get_pid(), and delete_thread_of_inferior_arg::silent.
Referenced by delete_inferior(), and exit_inferior_1().
| void detach_inferior | ( | int | pid | ) |
Definition at line 257 of file inferior.c.
References _, exit_inferior_1(), find_inferior_pid(), pid, print_inferior_events, and printf_unfiltered().
Referenced by gnu_detach(), inf_ptrace_detach_success(), procfs_detach(), remote_detach_1(), remote_follow_fork(), and windows_detach().
|
static |
Definition at line 599 of file inferior.c.
References _, any_thread_of_process(), detach_command(), error(), number_or_range_parser::finished(), gdb_inferior_id_to_pid(), number_or_range_parser::get_number(), pid, thread_info::ptid, switch_to_thread(), valid_gdb_inferior_id(), and warning().
Referenced by initialize_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().
| void exit_inferior | ( | int | pid | ) |
Definition at line 230 of file inferior.c.
References _, exit_inferior_1(), find_inferior_pid(), pid, print_inferior_events, and printf_unfiltered().
Referenced by generic_mourn_inferior().
|
static |
Definition at line 192 of file inferior.c.
References delete_thread_of_inferior(), arm-linux::inf, inferior_list, iterate_over_threads(), observer_notify_inferior_exit(), delete_thread_of_inferior_arg::pid, inf::pid, and delete_thread_of_inferior_arg::silent.
Referenced by detach_inferior(), exit_inferior(), exit_inferior_num_silent(), and exit_inferior_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().
| 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().
| struct inferior* find_inferior_for_program_space | ( | struct program_space * | pspace | ) |
Definition at line 329 of file inferior.c.
References current_inferior(), arm-linux::inf, inferior_list, and inferior::pspace.
Referenced by program_space_empty_p(), and switch_to_program_space_and_thread().
| struct inferior* find_inferior_id | ( | int | num | ) |
Definition at line 290 of file inferior.c.
References arm-linux::inf, inferior_list, and inferior::num.
Referenced by clone_inferior_command(), exec_continue(), exit_inferior_num_silent(), gdb_inferior_id_to_pid(), inferior_command(), mi_cmd_exec_interrupt(), mi_cmd_execute(), mi_cmd_list_thread_groups(), mi_cmd_remove_inferior(), mi_cmd_target_detach(), parse_thread_id(), remove_inferior_command(), and thread_apply_command().
| struct inferior* find_inferior_pid | ( | int | pid | ) |
Definition at line 302 of file inferior.c.
References gdb_assert, arm-linux::inf, inferior_list, inf::pid, and pid.
Referenced by detach_inferior(), exit_inferior(), exit_inferior_silent(), find_inferior_object(), find_inferior_ptid(), get_sim_inferior_data_by_ptid(), get_windows_debug_event(), linux_nat_filter_event(), linux_nat_thread_address_space(), procfs_wait(), remote_pid_to_exec_file(), remove_breakpoints_pid(), and wait_lwp().
Definition at line 321 of file inferior.c.
References find_inferior_pid(), and ptid_get_pid().
Referenced by ada_get_task_number(), add_thread_silent(), check_pending_event_prevents_wildcard_vcont_callback(), core_pid_to_str(), darwin_resume(), default_thread_address_space(), default_thread_architecture(), fetch_inferior_event(), gdbsim_close_inferior(), gdbsim_fetch_register(), gdbsim_interrupt(), gdbsim_resume(), gdbsim_store_register(), get_inferior_stop_soon(), handle_inferior_event_1(), handle_signal_stop(), memory_xfer_partial_1(), mi_new_thread(), parse_spufs_run(), ps_pglobal_lookup(), record_btrace_replay_at_breakpoint(), remote_parse_stop_reply(), resume_lwp(), sol2_core_pid_to_str(), stop_all_threads(), stop_wait_callback(), and thread_change_ptid().
| 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().
| int have_inferiors | ( | void | ) |
Definition at line 408 of file inferior.c.
References arm-linux::inf, inferior_list, and inf::pid.
Referenced by detach_command(), extended_remote_create_inferior(), gdbsim_create_inferior(), inf_child_maybe_unpush_target(), kill_command(), postfork_hook(), remote_mourn(), remote_open_1(), and target_preopen().
| int have_live_inferiors | ( | void | ) |
Definition at line 451 of file inferior.c.
References number_of_live_inferiors().
Referenced by maint_set_target_async_command(), maint_set_target_non_stop_command(), quit_confirm(), set_mi_async_command(), and target_preopen().
| 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().
| void inferior_appeared | ( | struct inferior * | inf, |
| int | pid | ||
| ) |
Definition at line 268 of file inferior.c.
References observer_notify_inferior_appeared(), inf::pid, and pid.
Referenced by add_inferior_silent(), add_to_thread_list(), core_open(), darwin_attach(), do_attach(), do_initial_windows_stuff(), gdbsim_create_inferior(), gnu_attach(), go32_create_inferior(), inf_ptrace_attach(), postfork_hook(), procfs_attach(), procfs_create_inferior(), remote_add_inferior(), and tfile_open().
|
static |
Definition at line 679 of file inferior.c.
References _, any_thread_of_process(), inferior::args, error(), find_inferior_id(), arm-linux::inf, inferior_ptid, null_ptid, inferior::num, observer_notify_user_selected_context_changed(), parse_and_eval_long(), inf::pid, thread_info::ptid, ptid_get_pid(), set_current_inferior(), set_current_program_space(), switch_to_thread(), USER_SELECTED_FRAME, USER_SELECTED_INFERIOR, and USER_SELECTED_THREAD.
Referenced by initialize_inferiors().
|
static |
Definition at line 948 of file inferior.c.
References current_inferior(), and value_from_longest().
|
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().
|
static |
Definition at line 721 of file inferior.c.
References current_uiout, and print_inferior().
Referenced by initialize_inferiors().
| void initialize_inferiors | ( | void | ) |
Definition at line 968 of file inferior.c.
References _, add_cmd(), add_com(), add_inferior(), add_inferior_command(), add_info(), add_setshow_boolean_cmd(), program_space::aspace, inferior::aspace, class_run, clone_inferior_command(), cmdlist, create_internalvar_type_lazy(), current_inferior_, current_program_space, detach_inferior_command(), detachlist, filename_completer(), refcounted_object::incref(), inferior_command(), inferior_funcs, info_inferiors_command(), kill_inferior_command(), killlist, no_class, print_inferior_events, inferior::pspace, remove_inferior_command(), set_cmd_completer(), setprintlist, show_print_inferior_events(), and showprintlist.
Referenced by gdb_init().
Definition at line 346 of file inferior.c.
References arm-linux::inf, and inferior_list.
Referenced by darwin_find_inferior_by_pid(), darwin_find_inferior_by_task(), darwin_resume(), darwin_wait(), gdbpy_inferiors(), gdbsim_close(), gdbsim_interrupt(), gdbsim_resume(), get_sim_inferior_data(), mi_interp::init(), mi_cmd_exec_run(), mi_cmd_list_thread_groups(), mi_cmd_remove_inferior(), mi_on_resume_1(), quit_confirm(), quit_force(), and target_preopen().
|
static |
Definition at line 638 of file inferior.c.
References _, any_thread_of_process(), error(), number_or_range_parser::finished(), gdb_inferior_id_to_pid(), number_or_range_parser::get_number(), pid, thread_info::ptid, switch_to_thread(), target_kill(), valid_gdb_inferior_id(), and warning().
Referenced by initialize_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().
| int number_of_live_inferiors | ( | void | ) |
Definition at line 424 of file inferior.c.
References ALL_NON_EXITED_THREADS, arm-linux::inf, inferior_list, inf::pid, thread_info::ptid, ptid_get_pid(), and target_has_execution_1().
Referenced by have_live_inferiors(), remote_detach_1(), remote_kill(), and remote_mourn().
| 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.
|
static |
Definition at line 532 of file inferior.c.
References _, current_inferior(), ui_out::field_int(), ui_out::field_skip(), ui_out::field_string(), arm-linux::inf, inferior_list, inferior_pid_to_str(), ui_out::message(), number_is_in_list(), inf::pid, ui_out::table_body(), ui_out::table_header(), ui_out::text(), and ui_left.
Referenced by info_inferiors_command().
| void print_selected_inferior | ( | struct ui_out * | uiout | ) |
Definition at line 512 of file inferior.c.
References _, current_inferior(), inferior_pid_to_str(), ui_out::message(), and inf::pid.
Referenced by cli_on_user_selected_context_changed(), mi_user_selected_context_changed(), and tui_on_user_selected_context_changed().
| void prune_inferiors | ( | void | ) |
Definition at line 460 of file inferior.c.
References inferior::deletable(), delete_inferior(), inferior_list, inferior::next, inferior::pid, and inferior::removable.
Referenced by normal_stop().
|
static |
Definition at line 729 of file inferior.c.
References _, delete_inferior(), error(), find_inferior_id(), number_or_range_parser::finished(), number_or_range_parser::get_number(), inferior::num, inf::pid, and warning().
Referenced by initialize_inferiors().
| void set_current_inferior | ( | struct inferior * | inf | ) |
Definition at line 64 of file inferior.c.
References current_inferior_, refcounted_object::decref(), gdb_assert, and arm-linux::inf.
Referenced by add_inferior_command(), clone_inferior_command(), extended_remote_attach(), follow_exec(), follow_fork_inferior(), handle_inferior_event_1(), inferior_command(), mi_cmd_execute(), mi_cmd_remove_inferior(), run_one_inferior(), switch_to_thread_no_regs(), scoped_restore_current_inferior::~scoped_restore_current_inferior(), and scoped_restore_current_thread::~scoped_restore_current_thread().
|
static |
Definition at line 939 of file inferior.c.
References _, and fprintf_filtered().
Referenced by initialize_inferiors().
| 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().
|
static |
Definition at line 55 of file inferior.c.
Referenced by current_inferior(), initialize_inferiors(), and set_current_inferior().
|
static |
Definition at line 46 of file inferior.c.
|
static |
Definition at line 958 of file inferior.c.
Referenced by initialize_inferiors().
| struct inferior* inferior_list = NULL |
Definition at line 45 of file inferior.c.
Referenced by ada_tasks_new_objfile_observer(), add_inferior_silent(), delete_inferior(), discard_all_inferiors(), exit_inferior_1(), find_inferior_for_program_space(), find_inferior_id(), find_inferior_pid(), have_inferiors(), in_inferior_list(), iterate_over_inferiors(), number_of_inferiors(), number_of_live_inferiors(), pid_to_gdb_inferior_id(), print_inferior(), print_program_space(), prune_inferiors(), show_inferior_qualified_tids(), update_address_spaces(), and valid_gdb_inferior_id().
|
static |
Definition at line 50 of file inferior.c.
Referenced by add_inferior(), detach_inferior(), exit_inferior(), and initialize_inferiors().
1.8.14