GDB (xrefs)
Classes | Defines | Enumerations | Functions | Variables
/home/stan/gdb/src/gdb/infrun.c File Reference
#include "defs.h"
#include "gdb_string.h"
#include <ctype.h>
#include "symtab.h"
#include "frame.h"
#include "inferior.h"
#include "exceptions.h"
#include "breakpoint.h"
#include "gdb_wait.h"
#include "gdbcore.h"
#include "gdbcmd.h"
#include "cli/cli-script.h"
#include "target.h"
#include "gdbthread.h"
#include "annotate.h"
#include "symfile.h"
#include "top.h"
#include <signal.h>
#include "inf-loop.h"
#include "regcache.h"
#include "value.h"
#include "observer.h"
#include "language.h"
#include "solib.h"
#include "main.h"
#include "dictionary.h"
#include "block.h"
#include "gdb_assert.h"
#include "mi/mi-common.h"
#include "event-top.h"
#include "record.h"
#include "record-full.h"
#include "inline-frame.h"
#include "jit.h"
#include "tracepoint.h"
#include "continuations.h"
#include "interps.h"
#include "skip.h"
#include "probe.h"
#include "objfiles.h"
#include "completer.h"
#include "target-descriptions.h"

Go to the source code of this file.

Classes

struct  displaced_step_request
struct  displaced_step_inferior_state
struct  execution_control_state
struct  infcall_suspend_state
struct  infcall_control_state

Defines

#define SET_SIGS(nsigs, sigs, flags)
#define UNSET_SIGS(nsigs, sigs, flags)
#define RESUME_ALL   minus_one_ptid

Enumerations

enum  infwait_states { infwait_normal_state, infwait_thread_hop_state, infwait_step_watch_state, infwait_nonstep_watch_state }

Functions

static void signals_info (char *, int)
static void handle_command (char *, int)
static void sig_print_info (enum gdb_signal)
static void sig_print_header (void)
static void resume_cleanups (void *)
static int hook_stop_stub (void *)
static int restore_selected_frame (void *)
static int follow_fork (void)
static void set_schedlock_func (char *args, int from_tty, struct cmd_list_element *c)
static int currently_stepping (struct thread_info *tp)
static int currently_stepping_or_nexting_callback (struct thread_info *tp, void *data)
static void xdb_handle_command (char *args, int from_tty)
static int prepare_to_proceed (int)
static void print_exited_reason (int exitstatus)
static void print_signal_exited_reason (enum gdb_signal siggnal)
static void print_no_history_reason (void)
static void print_signal_received_reason (enum gdb_signal siggnal)
static void print_end_stepping_range_reason (void)
void _initialize_infrun (void)
void nullify_last_target_wait_ptid (void)
static void insert_hp_step_resume_breakpoint_at_frame (struct frame_info *)
static void insert_step_resume_breakpoint_at_caller (struct frame_info *)
static void insert_longjmp_resume_breakpoint (struct gdbarch *, CORE_ADDR)
static void show_step_stop_if_no_debug (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
static void show_debug_displaced (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
static void show_debug_infrun (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
static void show_disable_randomization (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
static void set_disable_randomization (char *args, int from_tty, struct cmd_list_element *c)
static void set_non_stop (char *args, int from_tty, struct cmd_list_element *c)
static void show_non_stop (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
static void set_observer_mode (char *args, int from_tty, struct cmd_list_element *c)
static void show_observer_mode (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
void update_observer_mode (void)
void update_signals_program_target (void)
static void set_stop_on_solib_events (char *args, int from_tty, struct cmd_list_element *c)
static void show_stop_on_solib_events (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
static void context_switch (ptid_t ptid)
void init_thread_stepping_state (struct thread_info *tss)
static void init_infwait_state (void)
static void show_follow_fork_mode_string (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
void follow_inferior_reset_breakpoints (void)
static int proceed_after_vfork_done (struct thread_info *thread, void *arg)
static void handle_vfork_child_exec_or_exit (int exec)
static void show_follow_exec_mode_string (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
static void follow_exec (ptid_t pid, char *execd_pathname)
static struct
displaced_step_inferior_state
get_displaced_stepping_state (int pid)
static struct
displaced_step_inferior_state
add_displaced_stepping_state (int pid)
struct displaced_step_closureget_displaced_step_closure_by_addr (CORE_ADDR addr)
static void remove_displaced_stepping_state (int pid)
static void infrun_inferior_exit (struct inferior *inf)
static void show_can_use_displaced_stepping (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
static int use_displaced_stepping (struct gdbarch *gdbarch)
static void displaced_step_clear (struct displaced_step_inferior_state *displaced)
static void displaced_step_clear_cleanup (void *arg)
void displaced_step_dump_bytes (struct ui_file *file, const gdb_byte *buf, size_t len)
static int displaced_step_prepare (ptid_t ptid)
static void write_memory_ptid (ptid_t ptid, CORE_ADDR memaddr, const gdb_byte *myaddr, int len)
static void displaced_step_restore (struct displaced_step_inferior_state *displaced, ptid_t ptid)
static void displaced_step_fixup (ptid_t event_ptid, enum gdb_signal signal)
static void infrun_thread_ptid_changed (ptid_t old_ptid, ptid_t new_ptid)
static void show_scheduler_mode (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
static int maybe_software_singlestep (struct gdbarch *gdbarch, CORE_ADDR pc)
ptid_t user_visible_resume_ptid (int step)
void resume (int step, enum gdb_signal sig)
static void clear_proceed_status_thread (struct thread_info *tp)
static int clear_proceed_status_callback (struct thread_info *tp, void *data)
void clear_proceed_status (void)
void proceed (CORE_ADDR addr, enum gdb_signal siggnal, int step)
void start_remote (int from_tty)
void init_wait_for_inferior (void)
static void handle_inferior_event (struct execution_control_state *ecs)
static void handle_step_into_function (struct gdbarch *gdbarch, struct execution_control_state *ecs)
static void handle_step_into_function_backward (struct gdbarch *gdbarch, struct execution_control_state *ecs)
static void check_exception_resume (struct execution_control_state *, struct frame_info *)
static void stop_stepping (struct execution_control_state *ecs)
static void prepare_to_wait (struct execution_control_state *ecs)
static void keep_going (struct execution_control_state *ecs)
static int infrun_thread_stop_requested_callback (struct thread_info *info, void *arg)
static void infrun_thread_stop_requested (ptid_t ptid)
static void infrun_thread_thread_exit (struct thread_info *tp, int silent)
static int delete_step_resume_breakpoint_callback (struct thread_info *info, void *data)
static void delete_step_thread_step_resume_breakpoint (void)
static void delete_step_thread_step_resume_breakpoint_cleanup (void *arg)
static void print_target_wait_results (ptid_t waiton_ptid, ptid_t result_ptid, const struct target_waitstatus *ws)
void prepare_for_detach (void)
void wait_for_inferior (void)
void fetch_inferior_event (void *client_data)
void set_step_info (struct frame_info *frame, struct symtab_and_line sal)
void get_last_target_status (ptid_t *ptidp, struct target_waitstatus *status)
static void adjust_pc_after_break (struct execution_control_state *ecs)
static int stepped_in_from (struct frame_info *frame, struct frame_id step_frame_id)
static int handle_syscall_event (struct execution_control_state *ecs)
static void clear_stop_func (struct execution_control_state *ecs)
static void fill_in_stop_func (struct gdbarch *gdbarch, struct execution_control_state *ecs)
static void insert_step_resume_breakpoint_at_sal_1 (struct gdbarch *gdbarch, struct symtab_and_line sr_sal, struct frame_id sr_id, enum bptype sr_type)
void insert_step_resume_breakpoint_at_sal (struct gdbarch *gdbarch, struct symtab_and_line sr_sal, struct frame_id sr_id)
static void insert_exception_resume_breakpoint (struct thread_info *tp, struct block *b, struct frame_info *frame, struct symbol *sym)
static void insert_exception_resume_from_probe (struct thread_info *tp, const struct probe *probe, struct frame_info *frame)
void normal_stop (void)
int signal_stop_state (int signo)
int signal_print_state (int signo)
int signal_pass_state (int signo)
static void signal_cache_update (int signo)
int signal_stop_update (int signo, int state)
int signal_print_update (int signo, int state)
int signal_pass_update (int signo, int state)
void signal_catch_update (const unsigned int *info)
static VEC (char_ptr)
enum gdb_signal gdb_signal_from_command (int num)
static void validate_siginfo_access (void)
static void siginfo_value_read (struct value *v)
static void siginfo_value_write (struct value *v, struct value *fromval)
static struct valuesiginfo_make_value (struct gdbarch *gdbarch, struct internalvar *var, void *ignore)
struct infcall_suspend_statesave_infcall_suspend_state (void)
void restore_infcall_suspend_state (struct infcall_suspend_state *inf_state)
static void do_restore_infcall_suspend_state_cleanup (void *state)
struct cleanupmake_cleanup_restore_infcall_suspend_state (struct infcall_suspend_state *inf_state)
void discard_infcall_suspend_state (struct infcall_suspend_state *inf_state)
struct regcacheget_infcall_suspend_state_regcache (struct infcall_suspend_state *inf_state)
struct infcall_control_statesave_infcall_control_state (void)
void restore_infcall_control_state (struct infcall_control_state *inf_status)
static void do_restore_infcall_control_state_cleanup (void *sts)
struct cleanupmake_cleanup_restore_infcall_control_state (struct infcall_control_state *inf_status)
void discard_infcall_control_state (struct infcall_control_state *inf_status)
int ptid_match (ptid_t ptid, ptid_t filter)
static void restore_inferior_ptid (void *arg)
struct cleanupsave_inferior_ptid (void)
void clear_exit_convenience_vars (void)
static void set_exec_direction_func (char *args, int from_tty, struct cmd_list_element *cmd)
static void show_exec_direction_func (struct ui_file *out, int from_tty, struct cmd_list_element *cmd, const char *value)
static void show_schedule_multiple (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)

Variables

int step_stop_if_no_debug = 0
int sync_execution = 0
static ptid_t previous_inferior_ptid
static int detach_fork = 1
int debug_displaced = 0
unsigned int debug_infrun = 0
int disable_randomization = 1
int non_stop = 0
static int non_stop_1 = 0
int observer_mode = 0
static int observer_mode_1 = 0
static unsigned char * signal_stop
static unsigned char * signal_print
static unsigned char * signal_program
static unsigned char * signal_catch
static unsigned char * signal_pass
static struct cmd_list_elementstop_command
static struct symbolstep_start_function
int stop_on_solib_events
int stop_after_trap
struct regcachestop_registers
static int stop_print_frame
static ptid_t target_last_wait_ptid
static struct target_waitstatus target_last_waitstatus
static const char follow_fork_mode_child [] = "child"
static const char follow_fork_mode_parent [] = "parent"
static const char *const follow_fork_mode_kind_names []
static const char * follow_fork_mode_string = follow_fork_mode_parent
static const char follow_exec_mode_new [] = "new"
static const char follow_exec_mode_same [] = "same"
static const char *const follow_exec_mode_names []
static const char * follow_exec_mode_string = follow_exec_mode_same
static int singlestep_breakpoints_inserted_p = 0
static ptid_t singlestep_ptid
static CORE_ADDR singlestep_pc
static ptid_t saved_singlestep_ptid
static int stepping_past_singlestep_breakpoint
static ptid_t deferred_step_ptid
static struct
displaced_step_inferior_state
displaced_step_inferior_states
static enum auto_boolean can_use_displaced_stepping = AUTO_BOOLEAN_AUTO
static const char schedlock_off [] = "off"
static const char schedlock_on [] = "on"
static const char schedlock_step [] = "step"
static const char *const scheduler_enums []
static const char * scheduler_mode = schedlock_off
int sched_multi = 0
ptid_t waiton_ptid
static enum infwait_states infwait_state
static struct lval_funcs siginfo_value_funcs
int execution_direction = EXEC_FORWARD
static const char exec_forward [] = "forward"
static const char exec_reverse [] = "reverse"
static const char * exec_direction = exec_forward
static const char *const exec_direction_names []
static struct internalvar_funcs siginfo_funcs

Define Documentation

#define RESUME_ALL   minus_one_ptid

Definition at line 335 of file infrun.c.

Referenced by user_visible_resume_ptid().

#define SET_SIGS (   nsigs,
  sigs,
  flags 
)
Value:
do { \
    int signum = (nsigs); \
    while (signum-- > 0) \
      if ((sigs)[signum]) \
        (flags)[signum] = 1; \
  } while (0)

Definition at line 308 of file infrun.c.

Referenced by handle_command().

#define UNSET_SIGS (   nsigs,
  sigs,
  flags 
)
Value:
do { \
    int signum = (nsigs); \
    while (signum-- > 0) \
      if ((sigs)[signum]) \
        (flags)[signum] = 0; \
  } while (0)

Definition at line 316 of file infrun.c.

Referenced by handle_command().


Enumeration Type Documentation

Enumerator:
infwait_normal_state 
infwait_thread_hop_state 
infwait_step_watch_state 
infwait_nonstep_watch_state 

Definition at line 2396 of file infrun.c.


Function Documentation

void _initialize_infrun ( void  )
static struct displaced_step_inferior_state* add_displaced_stepping_state ( int  pid) [static, read]
static void adjust_pc_after_break ( struct execution_control_state ecs) [static]
static void check_exception_resume ( struct execution_control_state ecs,
struct frame_info frame 
) [static]
void clear_exit_convenience_vars ( void  )

Definition at line 7098 of file infrun.c.

References clear_internalvar(), and lookup_internalvar().

Referenced by core_open(), and handle_inferior_event().

void clear_proceed_status ( void  )
static int clear_proceed_status_callback ( struct thread_info tp,
void *  data 
) [static]

Definition at line 2005 of file infrun.c.

References clear_proceed_status_thread(), is_exited(), and thread_info::ptid.

Referenced by clear_proceed_status().

static void clear_proceed_status_thread ( struct thread_info tp) [static]
static void clear_stop_func ( struct execution_control_state ecs) [static]
static void context_switch ( ptid_t  ptid) [static]
static int currently_stepping ( struct thread_info tp) [static]
static int currently_stepping_or_nexting_callback ( struct thread_info tp,
void *  data 
) [static]
static int delete_step_resume_breakpoint_callback ( struct thread_info info,
void *  data 
) [static]
static void delete_step_thread_step_resume_breakpoint ( void  ) [static]
static void delete_step_thread_step_resume_breakpoint_cleanup ( void *  arg) [static]

Definition at line 2589 of file infrun.c.

References delete_step_thread_step_resume_breakpoint().

Referenced by wait_for_inferior().

static void displaced_step_clear ( struct displaced_step_inferior_state displaced) [static]
static void displaced_step_clear_cleanup ( void *  arg) [static]

Definition at line 1261 of file infrun.c.

References displaced_step_clear().

Referenced by displaced_step_fixup(), and displaced_step_prepare().

void displaced_step_dump_bytes ( struct ui_file file,
const gdb_byte buf,
size_t  len 
)
static void displaced_step_fixup ( ptid_t  event_ptid,
enum gdb_signal  signal 
) [static]
static int displaced_step_prepare ( ptid_t  ptid) [static]
static void displaced_step_restore ( struct displaced_step_inferior_state displaced,
ptid_t  ptid 
) [static]
static void do_restore_infcall_control_state_cleanup ( void *  sts) [static]

Definition at line 7025 of file infrun.c.

References restore_infcall_control_state().

Referenced by make_cleanup_restore_infcall_control_state().

static void do_restore_infcall_suspend_state_cleanup ( void *  state) [static]

Definition at line 6884 of file infrun.c.

References restore_infcall_suspend_state().

Referenced by make_cleanup_restore_infcall_suspend_state().

void fetch_inferior_event ( void *  client_data)
static void fill_in_stop_func ( struct gdbarch gdbarch,
struct execution_control_state ecs 
) [static]
static void follow_exec ( ptid_t  pid,
char *  execd_pathname 
) [static]
static int follow_fork ( void  ) [static]
enum gdb_signal gdb_signal_from_command ( int  num)

Definition at line 6615 of file infrun.c.

References _, and error().

Referenced by handle_command(), signal_command(), signals_info(), and VEC().

static struct displaced_step_inferior_state* get_displaced_stepping_state ( int  pid) [static, read]
struct regcache* get_infcall_suspend_state_regcache ( struct infcall_suspend_state inf_state) [read]

Definition at line 6905 of file infrun.c.

References infcall_suspend_state::registers.

Referenced by dummy_frame_sniffer().

void get_last_target_status ( ptid_t ptidp,
struct target_waitstatus status 
)
static void handle_command ( char *  args,
int  from_tty 
) [static]
static void handle_inferior_event ( struct execution_control_state ecs) [static]

Definition at line 3156 of file infrun.c.

References _, add_thread(), adjust_pc_after_break(), inferior::aspace, bpstat_causes_stop(), bpstat_clear(), bpstat_explains_signal(), BPSTAT_SIGNAL_HIDE, BPSTAT_SIGNAL_NO, bpstat_stop_status(), bpstat_what(), BPSTAT_WHAT_CLEAR_LONGJMP_RESUME, BPSTAT_WHAT_HP_STEP_RESUME, BPSTAT_WHAT_KEEP_CHECKING, BPSTAT_WHAT_SET_LONGJMP_RESUME, BPSTAT_WHAT_SINGLE, BPSTAT_WHAT_STEP_RESUME, BPSTAT_WHAT_STOP_NOISY, BPSTAT_WHAT_STOP_SILENT, breakpoint_inserted_here_p(), breakpoint_retire_moribund(), breakpoint_thread_match(), breakpoints_always_inserted_mode(), program_space::breakpoints_not_allowed, cancel_single_step_breakpoints(), check_exception_resume(), check_longjmp_breakpoint_for_call_dummy(), clear_exit_convenience_vars(), clear_stop_func(), context_switch(), thread_info::control, inferior::control, current_inferior(), thread_info::current_line, thread_info::current_symtab, current_target, currently_stepping(), currently_stepping_or_nexting_callback(), debug_displaced, debug_infrun, delete_exception_resume_breakpoint(), delete_step_resume_breakpoint(), delete_thread(), deprecated_context_hook, detach_breakpoints(), detach_fork, inferior::detaching, displaced_step_fixup(), displaced_step_restore(), do_cleanups(), symtab_and_line::end, error(), execution_control_state::event_thread, thread_control_state::exception_resume_breakpoint, EXEC_REVERSE, target_waitstatus::execd_pathname, execution_direction, inferior::exit_code, fill_in_stop_func(), find_frame_sal(), find_inferior_pid(), find_pc_function(), find_pc_line(), find_pc_overlay(), find_thread_ptid(), follow_exec(), follow_fork(), follow_fork_mode_child, follow_fork_mode_string, fprintf_filtered(), fprintf_unfiltered(), frame_find_by_id(), frame_id_eq(), frame_id_p(), frame_unwind_caller_id(), function_name_is_marked_for_skip(), gdb_assert, gdb_flush(), gdb_stdlog, gdb_stdout, gdbarch_gdb_signal_to_target(), gdbarch_gdb_signal_to_target_p(), gdbarch_get_longjmp_target(), gdbarch_get_longjmp_target_p(), gdbarch_have_nonsteppable_watchpoint(), gdbarch_in_solib_return_trampoline(), gdbarch_single_step_through_delay(), gdbarch_single_step_through_delay_p(), gdbarch_skip_solib_resolver(), gdbarch_skip_trampoline_code(), get_current_frame(), get_current_regcache(), get_displaced_stepping_state(), get_frame_arch(), get_frame_id(), get_frame_program_space(), get_frame_type(), get_regcache_arch(), get_regcache_aspace(), get_stack_frame_id(), get_thread_arch_aspace_regcache(), get_thread_regcache(), handle_solib_event(), handle_step_into_function(), handle_step_into_function_backward(), handle_syscall_event(), handle_vfork_child_exec_or_exit(), inferior::has_exit_code, in_prologue(), in_solib_dynsym_resolve_code(), in_thread_list(), inferior_ptid, inferior_thread(), infwait_nonstep_watch_state, infwait_normal_state, infwait_state, infwait_step_watch_state, infwait_thread_hop_state, init_sal(), thread_info::initiating_frame, INLINE_FRAME, inline_skipped_frames(), insert_breakpoints(), insert_hp_step_resume_breakpoint_at_frame(), insert_longjmp_resume_breakpoint(), insert_step_resume_breakpoint_at_caller(), insert_step_resume_breakpoint_at_sal(), target_waitstatus::integer, internal_error(), is_exited(), iterate_over_threads(), keep_going(), target_waitstatus::kind, symtab_and_line::line, LONGEST, lookup_internalvar(), thread_control_state::may_range_step, maybe_software_singlestep(), minus_one_ptid, NO_STOP_QUIETLY, non_stop, null_frame_id, null_ptid, thread_info::num, outer_frame_id, paddress(), symtab_and_line::pc, pc_at_non_inline_function(), pc_in_thread_step_range(), thread_info::pending_follow, pid_to_ptid(), pid_to_thread_id(), prepare_to_wait(), thread_info::prev_pc, print_end_stepping_range_reason(), print_exited_reason(), print_no_history_reason(), print_signal_exited_reason(), print_signal_received_reason(), probe_safe_evaluate_at_pc(), thread_control_state::proceed_to_finish, inferior::pspace, symtab_and_line::pspace, thread_info::ptid, execution_control_state::ptid, ptid_equal(), ptid_get_pid(), execution_control_state::random_signal, regcache_read_pc(), regcache_write_pc(), regular_breakpoint_inserted_here_p(), reinit_frame_cache(), target_waitstatus::related_pid, remove_breakpoints(), remove_single_step_breakpoints(), resume(), save_inferior_ptid(), symtab_and_line::section, set_current_inferior(), set_current_program_space(), set_executing(), set_internalvar_integer(), set_step_info(), target_waitstatus::sig, signal_print, signal_program, signal_stop_state(), SIGTRAMP_FRAME, singlestep_breakpoints_inserted_p, singlestep_pc, singlestep_ptid, skip_inline_frames(), skip_language_trampoline(), thread_info::step_after_step_resume_breakpoint, thread_control_state::step_frame_id, step_into_inline_frame(), STEP_OVER_ALL, thread_control_state::step_over_calls, STEP_OVER_NONE, STEP_OVER_UNDEBUGGABLE, displaced_step_inferior_state::step_ptid, thread_control_state::step_range_end, thread_control_state::step_range_start, thread_control_state::step_resume_breakpoint, thread_control_state::step_stack_frame_id, step_stop_if_no_debug, stepped_in_from(), thread_info::stepping_over_breakpoint, stepping_past_singlestep_breakpoint, stop_after_trap, thread_control_state::stop_bpstat, execution_control_state::stop_func_name, execution_control_state::stop_func_start, STOP_NONE, stop_on_solib_events, stop_pc, stop_print_frame, STOP_QUIETLY, STOP_QUIETLY_NO_SIGSTOP, STOP_QUIETLY_REMOTE, thread_info::stop_requested, thread_suspend_state::stop_signal, inferior_control_state::stop_soon, stop_stack_dummy, thread_control_state::stop_step, stop_stepping(), stopped_by_random_signal, thread_info::suspend, switch_to_thread(), symtab_and_line::symtab, sync_execution, target_can_async_p, target_have_steppable_watchpoint, target_last_waitstatus, target_mourn_inferior(), target_pass_signals(), target_pid_to_str(), target_resume(), target_stopped_by_watchpoint, target_stopped_data_address, target_terminal_inferior(), target_terminal_ours, target_terminal_ours_for_output, target_thread_alive(), TARGET_WAITKIND_EXECD, TARGET_WAITKIND_EXITED, TARGET_WAITKIND_FORKED, TARGET_WAITKIND_IGNORE, TARGET_WAITKIND_LOADED, TARGET_WAITKIND_NO_HISTORY, TARGET_WAITKIND_NO_RESUMED, TARGET_WAITKIND_SIGNALLED, TARGET_WAITKIND_SPURIOUS, TARGET_WAITKIND_STOPPED, TARGET_WAITKIND_SYSCALL_ENTRY, TARGET_WAITKIND_SYSCALL_RETURN, TARGET_WAITKIND_VFORK_DONE, TARGET_WAITKIND_VFORKED, thread_control_state::trap_expected, use_displaced_stepping(), target_waitstatus::value, value_as_address(), inferior::waiting_for_vfork_done, watchpoints_triggered(), execution_control_state::ws, and xfree().

Referenced by fetch_inferior_event(), infrun_thread_stop_requested_callback(), prepare_for_detach(), and wait_for_inferior().

static void handle_step_into_function ( struct gdbarch gdbarch,
struct execution_control_state ecs 
) [static]
static void handle_step_into_function_backward ( struct gdbarch gdbarch,
struct execution_control_state ecs 
) [static]
static int handle_syscall_event ( struct execution_control_state ecs) [static]
static void handle_vfork_child_exec_or_exit ( int  exec) [static]
static int hook_stop_stub ( void *  cmd) [static]

Definition at line 6226 of file infrun.c.

References execute_cmd_pre_hook().

Referenced by normal_stop().

static void infrun_inferior_exit ( struct inferior inf) [static]

Definition at line 1202 of file infrun.c.

References inferior::pid, and remove_displaced_stepping_state().

static void infrun_thread_ptid_changed ( ptid_t  old_ptid,
ptid_t  new_ptid 
) [static]
static void infrun_thread_stop_requested ( ptid_t  ptid) [static]
static int infrun_thread_stop_requested_callback ( struct thread_info info,
void *  arg 
) [static]
static void infrun_thread_thread_exit ( struct thread_info tp,
int  silent 
) [static]

Definition at line 2538 of file infrun.c.

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

static void init_infwait_state ( void  ) [static]

Definition at line 3050 of file infrun.c.

References infwait_normal_state, infwait_state, and pid_to_ptid().

Referenced by init_wait_for_inferior(), and proceed().

void init_thread_stepping_state ( struct thread_info tss)
void init_wait_for_inferior ( void  )
static void insert_exception_resume_breakpoint ( struct thread_info tp,
struct block b,
struct frame_info frame,
struct symbol sym 
) [static]
static void insert_exception_resume_from_probe ( struct thread_info tp,
const struct probe probe,
struct frame_info frame 
) [static]
static void insert_hp_step_resume_breakpoint_at_frame ( struct frame_info return_frame) [static]
static void insert_longjmp_resume_breakpoint ( struct gdbarch gdbarch,
CORE_ADDR  pc 
) [static]
static void insert_step_resume_breakpoint_at_caller ( struct frame_info next_frame) [static]
void insert_step_resume_breakpoint_at_sal ( struct gdbarch gdbarch,
struct symtab_and_line  sr_sal,
struct frame_id  sr_id 
)
static void insert_step_resume_breakpoint_at_sal_1 ( struct gdbarch gdbarch,
struct symtab_and_line  sr_sal,
struct frame_id  sr_id,
enum bptype  sr_type 
) [static]
static void keep_going ( struct execution_control_state ecs) [static]

Definition at line 7032 of file infrun.c.

References do_restore_infcall_control_state_cleanup(), and make_cleanup().

Referenced by call_function_by_hand().

Definition at line 6891 of file infrun.c.

References do_restore_infcall_suspend_state_cleanup(), and make_cleanup().

Referenced by call_function_by_hand().

static int maybe_software_singlestep ( struct gdbarch gdbarch,
CORE_ADDR  pc 
) [static]
void normal_stop ( void  )

Definition at line 5969 of file infrun.c.

References _, annotate_stopped(), annotate_thread_changed(), async_enable_stdin(), batch_silent, bpstat_print(), breakpoint_auto_delete(), breakpoints_always_inserted_mode(), catch_errors(), thread_info::control, disable_current_display(), do_cleanups(), do_displays(), DUMMY_FRAME, EXEC_REVERSE, execution_direction, find_pc_function(), finish_thread_state_cleanup(), frame_id_eq(), frame_pop(), gdb_assert, get_current_frame(), get_current_regcache(), get_frame_id(), get_frame_type(), get_last_target_status(), get_selected_frame(), has_stack_frames(), hook_stop_stub(), inferior_ptid, inferior_thread(), internal_error(), target_waitstatus::kind, make_cleanup(), minus_one_ptid, non_stop, null_cleanup(), null_ptid, observer_notify_normal_stop(), PRINT_NOTHING, PRINT_SRC_AND_LOC, PRINT_SRC_ONLY, print_stack_frame(), PRINT_UNKNOWN, printf_filtered(), thread_control_state::proceed_to_finish, prune_inferiors(), ptid_equal(), regcache_dup(), regcache_xfree(), remove_breakpoints(), RETURN_MASK_ALL, select_frame(), set_current_sal_from_frame(), SRC_AND_LOC, SRC_LINE, thread_control_state::step_frame_id, thread_control_state::stop_bpstat, stop_pc, stop_print_frame, stop_stack_dummy, STOP_STACK_DUMMY, thread_control_state::stop_step, stopped_by_random_signal, sync_execution, target_can_async_p, target_has_execution, target_pid_to_str(), target_terminal_ours, target_terminal_ours_for_output, TARGET_WAITKIND_EXITED, TARGET_WAITKIND_NO_RESUMED, and TARGET_WAITKIND_SIGNALLED.

Referenced by attach_command_post_wait(), fetch_inferior_event(), infrun_thread_stop_requested_callback(), proceed(), resume_cleanups(), run_inferior_call(), start_remote(), and step_once().

Definition at line 2906 of file infrun.c.

References minus_one_ptid.

Referenced by follow_fork(), fork_load_infrun_state(), and infrun_thread_thread_exit().

void prepare_for_detach ( void  )
static int prepare_to_proceed ( int  step) [static]
static void prepare_to_wait ( struct execution_control_state ecs) [static]
static void print_end_stepping_range_reason ( void  ) [static]
static void print_exited_reason ( int  exitstatus) [static]
static void print_no_history_reason ( void  ) [static]

Definition at line 5955 of file infrun.c.

References current_uiout, and ui_out_text().

Referenced by handle_inferior_event().

static void print_signal_exited_reason ( enum gdb_signal  siggnal) [static]
static void print_signal_received_reason ( enum gdb_signal  siggnal) [static]
static void print_target_wait_results ( ptid_t  waiton_ptid,
ptid_t  result_ptid,
const struct target_waitstatus ws 
) [static]
void proceed ( CORE_ADDR  addr,
enum gdb_signal  siggnal,
int  step 
)
static int proceed_after_vfork_done ( struct thread_info thread,
void *  arg 
) [static]
int ptid_match ( ptid_t  ptid,
ptid_t  filter 
)
static void remove_displaced_stepping_state ( int  pid) [static]
static void restore_inferior_ptid ( void *  arg) [static]

Definition at line 7073 of file infrun.c.

References cleanup::arg, inferior_ptid, and xfree().

Referenced by save_inferior_ptid().

static int restore_selected_frame ( void *  args) [static]

Definition at line 6961 of file infrun.c.

References _, frame_find_by_id(), select_frame(), and warning().

Referenced by restore_infcall_control_state().

void resume ( int  step,
enum gdb_signal  sig 
)

Definition at line 1719 of file infrun.c.

References _, bpstat_should_step(), breakpoint_here_p(), breakpoint_inserted_here_p(), thread_info::control, current_inferior(), debug_displaced, debug_infrun, discard_cleanups(), displaced_step_dump_bytes(), displaced_step_prepare(), error(), fprintf_unfiltered(), gdb_assert, gdb_stdlog, gdbarch_cannot_step_breakpoint(), gdbarch_displaced_step_hw_singlestep(), gdbarch_skip_permanent_breakpoint(), gdbarch_skip_permanent_breakpoint_p(), gdbarch_software_single_step_p(), get_current_frame(), get_current_regcache(), get_displaced_stepping_state(), get_regcache_arch(), get_regcache_aspace(), get_thread_regcache(), inferior_ptid, inferior_thread(), insert_breakpoints(), insert_hp_step_resume_breakpoint_at_frame(), make_cleanup(), thread_control_state::may_range_step, maybe_software_singlestep(), paddress(), pc_in_thread_step_range(), permanent_breakpoint_here, ptid_get_pid(), QUIT, read_memory(), regcache_read_pc(), remove_single_step_breakpoints(), resume_cleanups(), set_running(), signal_pass, singlestep_breakpoints_inserted_p, thread_info::step_after_step_resume_breakpoint, displaced_step_inferior_state::step_closure, thread_control_state::step_resume_breakpoint, stepping_past_singlestep_breakpoint, thread_suspend_state::stop_signal, thread_info::suspend, target_pass_signals(), target_pid_to_str(), target_resume(), target_terminal_inferior(), thread_control_state::trap_expected, use_displaced_stepping(), and user_visible_resume_ptid().

Referenced by do_initial_windows_stuff(), handle_inferior_event(), keep_going(), and proceed().

static void resume_cleanups ( void *  ignore) [static]

Definition at line 1606 of file infrun.c.

References normal_stop().

Referenced by keep_going(), and resume().

struct cleanup* save_inferior_ptid ( void  ) [read]
static void set_disable_randomization ( char *  args,
int  from_tty,
struct cmd_list_element c 
) [static]

Definition at line 179 of file infrun.c.

References _, error(), and target_supports_disable_randomization().

static void set_exec_direction_func ( char *  args,
int  from_tty,
struct cmd_list_element cmd 
) [static]

Definition at line 7120 of file infrun.c.

References _, error(), EXEC_FORWARD, exec_forward, EXEC_REVERSE, and target_can_execute_reverse.

static void set_non_stop ( char *  args,
int  from_tty,
struct cmd_list_element c 
) [static]

Definition at line 194 of file infrun.c.

References _, error(), non_stop, non_stop_1, and target_has_execution.

static void set_observer_mode ( char *  args,
int  from_tty,
struct cmd_list_element c 
) [static]
static void set_schedlock_func ( char *  args,
int  from_tty,
struct cmd_list_element c 
) [static]
void set_step_info ( struct frame_info frame,
struct symtab_and_line  sal 
)
static void set_stop_on_solib_events ( char *  args,
int  from_tty,
struct cmd_list_element c 
) [static]

Definition at line 353 of file infrun.c.

References update_solib_breakpoints().

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

Definition at line 1218 of file infrun.c.

References _, AUTO_BOOLEAN_AUTO, can_use_displaced_stepping, fprintf_filtered(), and non_stop.

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

Definition at line 144 of file infrun.c.

References _, and fprintf_filtered().

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

Definition at line 152 of file infrun.c.

References _, and fprintf_filtered().

static void show_disable_randomization ( struct ui_file file,
int  from_tty,
struct cmd_list_element c,
const char *  value 
) [static]
static void show_exec_direction_func ( struct ui_file out,
int  from_tty,
struct cmd_list_element cmd,
const char *  value 
) [static]

Definition at line 7138 of file infrun.c.

References _, EXEC_FORWARD, EXEC_REVERSE, fprintf_filtered(), and internal_error().

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

Definition at line 807 of file infrun.c.

References _, and fprintf_filtered().

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

Definition at line 405 of file infrun.c.

References _, and fprintf_filtered().

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

Definition at line 207 of file infrun.c.

References _, and fprintf_filtered().

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

Definition at line 260 of file infrun.c.

References _, and fprintf_filtered().

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

Definition at line 7156 of file infrun.c.

References _, and fprintf_filtered().

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

Definition at line 1622 of file infrun.c.

References _, and fprintf_filtered().

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

Definition at line 119 of file infrun.c.

References _, and fprintf_filtered().

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

Definition at line 359 of file infrun.c.

References _, and fprintf_filtered().

static void sig_print_header ( void  ) [static]

Definition at line 6312 of file infrun.c.

References _, and printf_filtered().

Referenced by handle_command(), and signals_info().

static void sig_print_info ( enum gdb_signal  oursig) [static]
static struct value* siginfo_make_value ( struct gdbarch gdbarch,
struct internalvar var,
void *  ignore 
) [static, read]
static void siginfo_value_read ( struct value v) [static]
static void siginfo_value_write ( struct value v,
struct value fromval 
) [static]
static void signal_cache_update ( int  signo) [static]
void signal_catch_update ( const unsigned int info)
int signal_pass_update ( int  signo,
int  state 
)

Definition at line 6288 of file infrun.c.

References signal_cache_update(), and signal_program.

Referenced by nto_initialize_signals().

Definition at line 6239 of file infrun.c.

References signal_print.

int signal_print_update ( int  signo,
int  state 
)

Definition at line 6278 of file infrun.c.

References signal_cache_update(), and signal_print.

Referenced by check_thread_signals(), and nto_initialize_signals().

Definition at line 6233 of file infrun.c.

References signal_stop.

Referenced by handle_inferior_event().

int signal_stop_update ( int  signo,
int  state 
)

Definition at line 6268 of file infrun.c.

References signal_cache_update(), and signal_stop.

Referenced by check_thread_signals(), and nto_initialize_signals().

static void signals_info ( char *  signum_exp,
int  from_tty 
) [static]
void start_remote ( int  from_tty)
static int stepped_in_from ( struct frame_info frame,
struct frame_id  step_frame_id 
) [static]

Definition at line 3057 of file infrun.c.

References frame_id_eq(), get_frame_id(), get_frame_type(), get_prev_frame(), and INLINE_FRAME.

Referenced by handle_inferior_event().

static void stop_stepping ( struct execution_control_state ecs) [static]
void update_observer_mode ( void  )

Definition at line 328 of file infrun.c.

References signal_program, and target_program_signals().

Referenced by remote_start_remote().

static int use_displaced_stepping ( struct gdbarch gdbarch) [static]
static void validate_siginfo_access ( void  ) [static]

Definition at line 6670 of file infrun.c.

References _, error(), inferior_ptid, is_exited(), is_running(), null_ptid, and ptid_equal().

Referenced by siginfo_value_read(), and siginfo_value_write().

static VEC ( char_ptr  ) [static]

Definition at line 6520 of file infrun.c.

References VEC, VEC_free, and VEC_merge.

void wait_for_inferior ( void  )
static void write_memory_ptid ( ptid_t  ptid,
CORE_ADDR  memaddr,
const gdb_byte myaddr,
int  len 
) [static]

Definition at line 1419 of file infrun.c.

References do_cleanups(), inferior_ptid, save_inferior_ptid(), and write_memory().

Referenced by displaced_step_restore().

static void xdb_handle_command ( char *  args,
int  from_tty 
) [static]

Variable Documentation

Definition at line 1215 of file infrun.c.

Referenced by show_can_use_displaced_stepping(), and use_displaced_stepping().

Definition at line 142 of file infrun.c.

Referenced by amd64_displaced_step_copy_insn(), amd64_displaced_step_fixup(), amd64_relocate_instruction(), arm_copy_alu_imm(), arm_copy_alu_reg(), arm_copy_alu_shifted_reg(), arm_copy_b_bl_blx(), arm_copy_block_xfer(), arm_copy_bx_blx_reg(), arm_copy_copro_load_store(), arm_copy_extra_ld_st(), arm_copy_ldr_str_ldrb_strb(), arm_copy_preload(), arm_copy_preload_reg(), arm_copy_svc(), arm_copy_undef(), arm_copy_unmodified(), arm_copy_unpred(), arm_displaced_init_closure(), arm_linux_cleanup_svc(), arm_linux_copy_svc(), arm_linux_displaced_step_copy_insn(), arm_pc_is_thumb(), arm_process_displaced_insn(), cleanup_block_load_all(), cleanup_block_load_pc(), cleanup_block_store_pc(), cleanup_svc(), displaced_read_reg(), displaced_step_fixup(), displaced_step_prepare(), displaced_step_restore(), displaced_write_reg(), fixup_riprel(), handle_inferior_event(), i386_displaced_step_copy_insn(), i386_displaced_step_fixup(), i386_relocate_instruction(), ppc_displaced_step_fixup(), resume(), s390_displaced_step_fixup(), simple_displaced_step_copy_insn(), thumb2_copy_alu_imm(), thumb2_copy_b_bl_blx(), thumb2_copy_block_xfer(), thumb2_copy_copro_load_store(), thumb2_copy_load_literal(), thumb2_copy_load_reg_imm(), thumb2_copy_preload(), thumb2_copy_table_branch(), thumb_32bit_copy_undef(), thumb_copy_16bit_ldr_literal(), thumb_copy_alu_reg(), thumb_copy_b(), thumb_copy_bx_blx_reg(), thumb_copy_cbnz_cbz(), thumb_copy_pc_relative_32bit(), thumb_copy_pop_pc_16bit(), thumb_copy_svc(), thumb_copy_unmodified_16bit(), thumb_copy_unmodified_32bit(), thumb_decode_pc_relative_16bit(), and thumb_process_displaced_insn().

unsigned int debug_infrun = 0

Definition at line 986 of file infrun.c.

int detach_fork = 1 [static]

Definition at line 140 of file infrun.c.

Referenced by follow_fork(), handle_inferior_event(), and linux_child_follow_fork().

Definition at line 161 of file infrun.c.

Referenced by extended_remote_create_inferior_1(), and linux_nat_create_inferior().

Definition at line 1117 of file infrun.c.

Referenced by add_displaced_stepping_state(), and remove_displaced_stepping_state().

const char* exec_direction = exec_forward [static]

Definition at line 7112 of file infrun.c.

const char* const exec_direction_names[] [static]
Initial value:

Definition at line 7113 of file infrun.c.

const char exec_forward[] = "forward" [static]

Definition at line 7110 of file infrun.c.

Referenced by set_exec_direction_func().

const char exec_reverse[] = "reverse" [static]

Definition at line 7111 of file infrun.c.

Initial value:

Definition at line 798 of file infrun.c.

const char follow_exec_mode_new[] = "new" [static]

Definition at line 796 of file infrun.c.

Referenced by follow_exec().

const char follow_exec_mode_same[] = "same" [static]

Definition at line 797 of file infrun.c.

Definition at line 805 of file infrun.c.

Referenced by follow_exec().

const char follow_fork_mode_child[] = "child" [static]

Definition at line 394 of file infrun.c.

Referenced by follow_fork(), and handle_inferior_event().

Initial value:

Definition at line 397 of file infrun.c.

const char follow_fork_mode_parent[] = "parent" [static]

Definition at line 395 of file infrun.c.

Definition at line 403 of file infrun.c.

Referenced by follow_fork(), and handle_inferior_event().

Definition at line 2408 of file infrun.c.

Referenced by handle_inferior_event(), and init_infwait_state().

int non_stop_1 = 0 [static]

Definition at line 191 of file infrun.c.

Referenced by set_non_stop(), and set_observer_mode().

Definition at line 219 of file infrun.c.

Referenced by set_observer_mode(), and update_observer_mode().

int observer_mode_1 = 0 [static]

Definition at line 220 of file infrun.c.

Referenced by set_observer_mode(), and update_observer_mode().

Definition at line 133 of file infrun.c.

Definition at line 976 of file infrun.c.

const char schedlock_off[] = "off" [static]

Definition at line 1611 of file infrun.c.

Referenced by set_schedlock_func().

const char schedlock_on[] = "on" [static]

Definition at line 1612 of file infrun.c.

Referenced by prepare_to_proceed(), and user_visible_resume_ptid().

const char schedlock_step[] = "step" [static]

Definition at line 1613 of file infrun.c.

Referenced by prepare_to_proceed(), and user_visible_resume_ptid().

const char* const scheduler_enums[] [static]
Initial value:

Definition at line 1614 of file infrun.c.

Definition at line 1620 of file infrun.c.

Referenced by prepare_to_proceed(), set_schedlock_func(), and user_visible_resume_ptid().

Initial value:
{
  siginfo_make_value,
  NULL,
  NULL
}

Definition at line 7165 of file infrun.c.

Initial value:

Definition at line 6737 of file infrun.c.

unsigned char* signal_catch [static]

Definition at line 301 of file infrun.c.

Referenced by signal_cache_update(), and signal_catch_update().

unsigned char* signal_pass [static]

Definition at line 306 of file infrun.c.

Referenced by handle_command(), resume(), signal_cache_update(), and signal_catch_update().

unsigned char* signal_print [static]
unsigned char* signal_program [static]
unsigned char* signal_stop [static]

Definition at line 972 of file infrun.c.

Referenced by handle_inferior_event(), and maybe_software_singlestep().

Definition at line 969 of file infrun.c.

Referenced by handle_inferior_event().

struct symbol* step_start_function [static]

Definition at line 343 of file infrun.c.

Definition at line 117 of file infrun.c.

Referenced by handle_inferior_event(), and step_once().

Definition at line 977 of file infrun.c.

Referenced by handle_inferior_event(), init_wait_for_inferior(), and resume().

struct cmd_list_element* stop_command [static]

Definition at line 339 of file infrun.c.

Definition at line 380 of file infrun.c.

Referenced by handle_inferior_event(), and normal_stop().

Definition at line 376 of file infrun.c.

Referenced by call_function_by_hand(), and get_return_value().

Definition at line 385 of file infrun.c.

Referenced by get_last_target_status().

Definition at line 386 of file infrun.c.

Referenced by get_last_target_status(), and handle_inferior_event().

Definition at line 2405 of file infrun.c.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines