GDB (xrefs)
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
inferior Class Reference

#include "inferior.h"

Inheritance diagram for inferior:

Public Member Functions

 inferior (int pid)
 
 ~inferior ()
 
bool deletable () const
 
void push_target (struct target_ops *t)
 
void push_target (target_ops_up &&t)
 
int unpush_target (struct target_ops *t)
 
bool target_is_pushed (const target_ops *t) const
 
target_opsfind_target_beneath (const target_ops *t)
 
target_opstop_target ()
 
void pop_all_targets ()
 
void pop_all_targets_above (enum strata stratum)
 
void pop_all_targets_at_and_above (enum strata stratum)
 
struct process_stratum_targetprocess_target ()
 
target_opstarget_at (enum strata stratum)
 
bool has_execution ()
 
inf_threads_range threads ()
 
inf_non_exited_threads_range non_exited_threads ()
 
safe_inf_threads_range threads_safe ()
 
thread_infofind_thread (ptid_t ptid)
 
void clear_thread_list ()
 
void add_continuation (std::function< void()> &&cont)
 
void do_all_continuations ()
 
void set_tty (std::string terminal_name)
 
const std::string & tty ()
 
void set_args (std::string args)
 
void set_args (gdb::array_view< char *const > args)
 
const std::string & args () const
 
void set_cwd (std::string cwd)
 
const std::string & cwd () const
 

Public Attributes

intrusive_list< thread_infothread_list
 
std::unordered_map< ptid_t, thread_info * > ptid_thread_map
 
int num = 0
 
int pid = 0
 
bool fake_pid_p = false
 
int highest_thread_num = 0
 
inferior_control_state control
 
bool removable = false
 
struct address_spaceaspace = NULL
 
struct program_spacepspace = NULL
 
target_terminal_state terminal_state = target_terminal_state::is_ours
 
gdb_environ environment
 
bool attach_flag = false
 
inferiorvfork_parent = NULL
 
inferiorvfork_child = NULL
 
bool pending_detach = false
 
thread_infothread_waiting_for_vfork_done = nullptr
 
bool detaching = false
 
bool needs_setup = false
 
bool starting_up = false
 
bool in_initial_library_scan = false
 
std::unique_ptr< private_inferiorpriv
 
bool has_exit_code = false
 
LONGEST exit_code = 0
 
symfile_add_flags symfile_flags = 0
 
target_desc_info tdesc_info
 
struct gdbarchgdbarch = NULL
 
displaced_step_inferior_state displaced_step_state
 
registry< inferiorregistry_fields
 

Private Member Functions

void unpush_target_and_assert (struct target_ops *target)
 

Private Attributes

target_stack m_target_stack
 
std::string m_terminal
 
std::list< std::function< void()> > m_continuations
 
std::string m_args
 
std::string m_cwd
 

Detailed Description

Definition at line 395 of file inferior.h.

Constructor & Destructor Documentation

◆ inferior()

inferior::inferior ( int pid)
explicit

◆ ~inferior()

inferior::~inferior ( )

Member Function Documentation

◆ add_continuation()

void inferior::add_continuation ( std::function< void()> && cont)

Definition at line 177 of file inferior.c.

References m_continuations.

Referenced by attach_command(), and notice_new_inferior().

◆ args()

const std::string & inferior::args ( ) const
inline

◆ clear_thread_list()

void inferior::clear_thread_list ( )

◆ cwd()

const std::string & inferior::cwd ( ) const
inline

◆ deletable()

bool inferior::deletable ( ) const
inline

Definition at line 403 of file inferior.h.

◆ do_all_continuations()

void inferior::do_all_continuations ( )

Definition at line 183 of file inferior.c.

References m_continuations.

Referenced by inferior_event_handler().

◆ find_target_beneath()

target_ops * inferior::find_target_beneath ( const target_ops * t)
inline

Definition at line 424 of file inferior.h.

References target_stack::find_beneath(), and m_target_stack.

Referenced by target_ops::beneath().

◆ find_thread()

thread_info * inferior::find_thread ( ptid_t ptid)

◆ has_execution()

bool inferior::has_execution ( )
inline

◆ non_exited_threads()

inf_non_exited_threads_range inferior::non_exited_threads ( )
inline

◆ pop_all_targets()

void inferior::pop_all_targets ( )
inline

Definition at line 434 of file inferior.h.

References dummy_stratum, and pop_all_targets_above().

◆ pop_all_targets_above()

void inferior::pop_all_targets_above ( enum strata stratum)

◆ pop_all_targets_at_and_above()

void inferior::pop_all_targets_at_and_above ( enum strata stratum)

◆ process_target()

struct process_stratum_target * inferior::process_target ( )
inline

Definition at line 449 of file inferior.h.

References target_stack::at(), m_target_stack, and process_stratum.

Referenced by add_thread_db_info(), amd_dbgapi_target::async(), attach_command(), check_multi_target_resumption(), clear_inline_frame_state(), amd_dbgapi_target::commit_resumed(), consume_one_event(), dcache_read_memory_partial(), detach_command(), record_btrace_target::fetch_registers(), process_stratum_target::follow_exec(), follow_fork(), get_current_core_target(), get_current_remote_target(), get_thread_regcache(), get_thread_regcache_for_ptid(), handle_inferior_event(), infrun_thread_stop_requested(), internal_resume_ptid(), all_matching_threads_iterator::m_inf_matches(), mi_interp::on_target_resumed(), prepare_one_step(), process_one_event(), record_full_wait_1(), record_btrace_target::record_is_replaying(), record_btrace_target::record_method(), registers_changed_thread(), amd_dbgapi_target::resume(), record_btrace_target::resume(), record_full_target::resume(), resume_1(), run_command_1(), set_last_target_status_stopped(), set_thread_exited(), sol2_core_pid_to_str(), sol_update_thread_list_callback(), amd_dbgapi_target::stop(), record_btrace_target::stop(), stop_current_target_threads_ns(), switch_to_inferior_and_push_target(), sync_threadlists(), target_resume(), target_stop(), target_wait(), aix_thread_target::thread_alive(), thread_db_find_new_threads_2(), thread_from_lwp(), update_threads_executing(), user_visible_resume_target(), aix_thread_target::wait(), amd_dbgapi_target::wait(), record_btrace_target::wait(), and sol_thread_target::wait().

◆ push_target() [1/2]

void inferior::push_target ( struct target_ops * t)
inline

◆ push_target() [2/2]

void inferior::push_target ( target_ops_up && t)
inline

Definition at line 410 of file inferior.h.

References m_target_stack, and target_stack::push().

◆ set_args() [1/2]

void inferior::set_args ( gdb::array_view< char *const > args)

Definition at line 171 of file inferior.c.

References args(), and set_args().

◆ set_args() [2/2]

void inferior::set_args ( std::string args)
inline

Definition at line 522 of file inferior.h.

References args(), and m_args.

Referenced by captured_main_1(), run_command_1(), set_args(), and set_args_value().

◆ set_cwd()

void inferior::set_cwd ( std::string cwd)
inline

Definition at line 541 of file inferior.h.

References cwd(), and m_cwd.

Referenced by set_cwd_value().

◆ set_tty()

void inferior::set_tty ( std::string terminal_name)

Definition at line 157 of file inferior.c.

References m_terminal.

Referenced by captured_main_1(), mi_cmd_inferior_tty_set(), and set_tty_value().

◆ target_at()

target_ops * inferior::target_at ( enum strata stratum)
inline

Definition at line 453 of file inferior.h.

References target_stack::at(), and m_target_stack.

Referenced by find_target_at(), and record_btrace_on_new_thread().

◆ target_is_pushed()

bool inferior::target_is_pushed ( const target_ops * t) const
inline

Definition at line 420 of file inferior.h.

References target_stack::is_pushed(), and m_target_stack.

Referenced by gnu_nat_target::create_inferior().

◆ threads()

inf_threads_range inferior::threads ( )
inline

◆ threads_safe()

safe_inf_threads_range inferior::threads_safe ( )
inline

Definition at line 492 of file inferior.h.

◆ top_target()

target_ops * inferior::top_target ( )
inline

Definition at line 428 of file inferior.h.

References m_target_stack, and target_stack::top().

Referenced by target_terminal::inferior(), target_terminal::info(), target_terminal::init(), pop_all_targets_above(), pop_all_targets_at_and_above(), target_terminal::restore_inferior(), section_table_read_available_memory(), sparc_fetch_wcookie(), target_always_non_stop_p(), target_async(), target_attach_no_wait(), target_augmented_libraries_svr4_read(), target_btrace_conf(), target_call_history(), target_call_history_from(), target_call_history_range(), target_can_accel_watchpoint_condition(), target_can_do_single_step(), target_can_download_tracepoint(), target_can_execute_reverse(), target_can_lock_scheduler(), target_can_run_breakpoint_commands(), target_can_use_agent(), target_can_use_hardware_watchpoint(), target_commit_resumed(), target_core_of_thread(), target_delete_record(), target_detach(), target_disable_btrace(), target_disable_tracepoint(), target_disconnect(), target_done_generating_core(), target_download_trace_state_variable(), target_download_tracepoint(), target_dumpcore(), target_enable_btrace(), target_enable_tracepoint(), target_execution_direction(), target_extra_thread_info(), target_fetch_memtags(), target_fetch_registers(), target_fetch_x86_xsave_layout(), target_files_info(), target_filesystem_is_local(), target_find_memory_regions(), target_flash_done(), target_flash_erase(), target_follow_exec(), target_follow_fork(), target_get_ada_task_ptid(), target_get_bookmark(), target_get_min_fast_tracepoint_insn_len(), target_get_raw_trace_data(), target_get_tailcall_unwinder(), target_get_tib_address(), target_get_trace_state_variable_value(), target_get_trace_status(), target_get_tracepoint_status(), target_get_unwinder(), target_goto_bookmark(), target_goto_record(), target_goto_record_begin(), target_goto_record_end(), target_has_pending_events(), target_have_steppable_watchpoint(), target_insert_breakpoint(), target_insert_exec_catchpoint(), target_insert_fork_catchpoint(), target_insert_hw_breakpoint(), target_insert_mask_watchpoint(), target_insert_vfork_catchpoint(), target_insert_watchpoint(), target_insn_history(), target_insn_history_from(), target_insn_history_range(), target_interrupt(), target_is_async_p(), target_kill(), target_load(), target_log_command(), target_make_corefile_notes(), target_masked_watch_num_registers(), target_memory_map(), target_mourn_inferior(), target_pass_ctrlc(), target_pass_signals(), target_pid_to_exec_file(), target_pid_to_str(), target_post_attach(), target_prepare_to_generate_core(), target_prepare_to_store(), target_program_signals(), target_ranged_break_num_registers(), target_rcmd(), target_read_btrace(), target_record_is_replaying(), target_record_method(), target_record_stop_replaying(), target_record_will_replay(), target_region_ok_for_hw_watchpoint(), target_remove_breakpoint(), target_remove_exec_catchpoint(), target_remove_fork_catchpoint(), target_remove_hw_breakpoint(), target_remove_mask_watchpoint(), target_remove_vfork_catchpoint(), target_remove_watchpoint(), target_resume(), target_save_record(), target_save_trace_data(), target_search_memory(), target_set_circular_trace_buffer(), target_set_disconnected_tracing(), target_set_permissions(), target_set_syscall_catchpoint(), target_set_trace_buffer_size(), target_set_trace_notes(), target_shortname(), target_static_tracepoint_marker_at(), target_static_tracepoint_markers_by_strid(), target_stop(), target_stop_recording(), target_stopped_by_hw_breakpoint(), target_stopped_by_sw_breakpoint(), target_stopped_by_watchpoint(), target_store_memtags(), target_store_registers(), target_supports_delete_record(), target_supports_disable_randomization(), target_supports_dumpcore(), target_supports_enable_disable_tracepoint(), target_supports_evaluation_of_breakpoint_conditions(), target_supports_memory_tagging(), target_supports_multi_process(), target_supports_stopped_by_hw_breakpoint(), target_supports_stopped_by_sw_breakpoint(), target_supports_string_tracing(), target_teardown_btrace(), target_terminal_is_ours_kind(), target_thread_address_space(), target_thread_alive(), target_thread_architecture(), target_thread_events(), target_thread_handle_to_thread_info(), target_thread_info_to_thread_handle(), target_thread_name(), target_trace_find(), target_trace_init(), target_trace_set_readonly_regions(), target_trace_start(), target_trace_stop(), target_traceframe_info(), target_translate_tls_address(), target_update_thread_list(), target_upload_trace_state_variables(), target_upload_tracepoints(), target_use_agent(), target_verify_memory(), and target_wait().

◆ tty()

const std::string & inferior::tty ( )

◆ unpush_target()

int inferior::unpush_target ( struct target_ops * t)

◆ unpush_target_and_assert()

void inferior::unpush_target_and_assert ( struct target_ops * target)
private

Member Data Documentation

◆ aspace

struct address_space* inferior::aspace = NULL

◆ attach_flag

bool inferior::attach_flag = false

Definition at line 593 of file inferior.h.

Referenced by gnu_nat_target::attach(), follow_fork_inferior(), and target_pre_inferior().

◆ control

inferior_control_state inferior::control

◆ detaching

bool inferior::detaching = false

Definition at line 615 of file inferior.h.

Referenced by handle_one().

◆ displaced_step_state

displaced_step_inferior_state inferior::displaced_step_state

◆ environment

gdb_environ inferior::environment

◆ exit_code

LONGEST inferior::exit_code = 0

Definition at line 640 of file inferior.h.

Referenced by handle_inferior_event(), and print_one_inferior().

◆ fake_pid_p

bool inferior::fake_pid_p = false

Definition at line 563 of file inferior.h.

Referenced by linux_find_memory_regions_full().

◆ gdbarch

struct gdbarch* inferior::gdbarch = NULL

◆ has_exit_code

bool inferior::has_exit_code = false

Definition at line 639 of file inferior.h.

Referenced by handle_inferior_event(), and print_one_inferior().

◆ highest_thread_num

int inferior::highest_thread_num = 0

Definition at line 566 of file inferior.h.

Referenced by target_pre_inferior(), and thread_info::thread_info().

◆ in_initial_library_scan

bool inferior::in_initial_library_scan = false

Definition at line 632 of file inferior.h.

◆ m_args

std::string inferior::m_args
private

Definition at line 684 of file inferior.h.

Referenced by args(), and set_args().

◆ m_continuations

std::list<std::function<void ()> > inferior::m_continuations
private

Definition at line 681 of file inferior.h.

Referenced by add_continuation(), do_all_continuations(), and ~inferior().

◆ m_cwd

std::string inferior::m_cwd
private

Definition at line 688 of file inferior.h.

Referenced by cwd(), and set_cwd().

◆ m_target_stack

target_stack inferior::m_target_stack
private

◆ m_terminal

std::string inferior::m_terminal
private

Definition at line 678 of file inferior.h.

Referenced by set_tty(), and tty().

◆ needs_setup

bool inferior::needs_setup = false

Definition at line 621 of file inferior.h.

Referenced by attach_command(), attach_post_wait(), handle_one(), and setup_inferior().

◆ num

int inferior::num = 0

◆ pending_detach

bool inferior::pending_detach = false

Definition at line 607 of file inferior.h.

Referenced by follow_fork_inferior(), and handle_vfork_child_exec_or_exit().

◆ pid

int inferior::pid = 0

◆ priv

std::unique_ptr<private_inferior> inferior::priv

◆ pspace

struct program_space* inferior::pspace = NULL

◆ ptid_thread_map

std::unordered_map<ptid_t, thread_info *> inferior::ptid_thread_map

Definition at line 464 of file inferior.h.

Referenced by clear_thread_list(), find_thread(), and set_thread_exited().

◆ registry_fields

registry<inferior> inferior::registry_fields

Definition at line 667 of file inferior.h.

◆ removable

bool inferior::removable = false

Definition at line 576 of file inferior.h.

Referenced by follow_fork_inferior().

◆ starting_up

bool inferior::starting_up = false

Definition at line 628 of file inferior.h.

◆ symfile_flags

symfile_add_flags inferior::symfile_flags = 0

Definition at line 644 of file inferior.h.

Referenced by follow_fork_inferior(), solib_read_symbols(), and symbol_file_add_main_1().

◆ tdesc_info

target_desc_info inferior::tdesc_info

◆ terminal_state

Definition at line 586 of file inferior.h.

Referenced by copy_terminal_info(), and swap_terminal_info().

◆ thread_list

intrusive_list<thread_info> inferior::thread_list

◆ thread_waiting_for_vfork_done

thread_info* inferior::thread_waiting_for_vfork_done = nullptr

◆ vfork_child

inferior* inferior::vfork_child = NULL

Definition at line 603 of file inferior.h.

Referenced by exec_on_vfork(), follow_fork_inferior(), and proceed_resume_thread_checked().

◆ vfork_parent

inferior* inferior::vfork_parent = NULL

Definition at line 597 of file inferior.h.

Referenced by follow_fork_inferior(), and handle_vfork_child_exec_or_exit().


The documentation for this class was generated from the following files: