GDB (xrefs)
|
#include "defs.h"
#include "arch-utils.h"
#include "inferior.h"
#include "infrun.h"
#include "regcache.h"
#include "gdbcmd.h"
#include "infcall.h"
#include "objfiles.h"
#include "linux-fork.h"
#include "linux-nat.h"
#include "gdbthread.h"
#include "source.h"
#include <sys/ptrace.h>
#include "gdb_wait.h"
#include <dirent.h>
#include <ctype.h>
Go to the source code of this file.
Classes | |
struct | fork_info |
Variables | |
struct fork_info * | fork_list |
static int | highest_fork_num |
static int | checkpointing_pid = 0 |
void _initialize_linux_fork | ( | void | ) |
Definition at line 756 of file linux-fork.c.
References _, add_cmd(), add_com(), add_info(), checkpoint_command(), class_obscure, delete_checkpoint_command(), deletelist, detach_checkpoint_command(), detachlist, info_checkpoints_command(), init_fork_list(), and restart_command().
struct fork_info* add_fork | ( | pid_t | pid | ) |
Definition at line 69 of file linux-fork.c.
References add_fork(), fork_list, highest_fork_num, inferior_ptid, fork_info::next, fork_info::num, fork_info::ptid, ptid_build(), and ptid_get_pid().
Referenced by add_fork(), and linux_handle_extended_wait().
Definition at line 224 of file linux-fork.c.
References parse_and_eval_long().
Referenced by fork_load_infrun_state(), and fork_save_infrun_state().
|
static |
Definition at line 650 of file linux-fork.c.
References _, call_function_by_hand(), checkpointing_pid, do_cleanups(), error(), find_fork_pid(), find_function_in_inferior(), fork_save_infrun_state(), get_last_target_status(), get_objfile_arch(), inf_has_multiple_threads(), inferior_ptid, info_verbose, lookup_minimal_symbol(), make_cleanup_restore_integer(), fork_info::num, fork_info::parent_ptid, printf_filtered(), ptid_get_lwp(), ptid_get_pid(), target_has_execution, update_thread_list(), value_as_long(), and value_from_longest().
Referenced by _initialize_linux_fork().
|
static |
Definition at line 485 of file linux-fork.c.
References _, delete_fork(), error(), find_fork_ptid(), find_thread_ptid(), fork_id_to_ptid(), gdb_assert, inferior_call_waitpid(), inferior_ptid, is_stopped(), minus_one_ptid, fork_info::parent_ptid, parse_and_eval_long(), printf_filtered(), ptid_equal(), ptid_get_pid(), ptrace(), target_pid_to_str(), and warning().
Referenced by _initialize_linux_fork().
|
static |
Definition at line 117 of file linux-fork.c.
References free_fork(), inferior_ptid, linux_nat_forget_process(), fork_info::next, fork_info::ptid, ptid_equal(), and ptid_get_pid().
Referenced by delete_checkpoint_command(), detach_checkpoint_command(), linux_fork_detach(), and linux_fork_mourn_inferior().
|
static |
Definition at line 526 of file linux-fork.c.
References _, delete_fork(), error(), fork_id_to_ptid(), inferior_ptid, minus_one_ptid, parse_and_eval_long(), printf_filtered(), fork_info::ptid, ptid_equal(), ptid_get_pid(), ptrace(), and target_pid_to_str().
Referenced by _initialize_linux_fork().
Definition at line 167 of file linux-fork.c.
References fork_info::next, and fork_info::num.
Referenced by fork_id_to_ptid(), and restart_command().
struct fork_info* find_fork_pid | ( | pid_t | pid | ) |
Definition at line 180 of file linux-fork.c.
References fork_info::next, fork_info::ptid, and ptid_get_pid().
Referenced by checkpoint_command(), and linux_handle_extended_wait().
Definition at line 154 of file linux-fork.c.
References fork_info::next, fork_info::ptid, and ptid_equal().
Referenced by delete_checkpoint_command(), inferior_call_waitpid(), and linux_fork_context().
Definition at line 192 of file linux-fork.c.
References find_fork_id(), pid_to_ptid(), and fork_info::ptid.
Referenced by delete_checkpoint_command(), and detach_checkpoint_command().
|
static |
Definition at line 236 of file linux-fork.c.
References call_lseek(), fork_info::clobber_regs, fork_info::filepos, get_current_regcache(), linux_nat_switch_fork(), fork_info::maxfd, nullify_last_target_wait_ptid(), fork_info::ptid, regcache_cpy(), regcache_read_pc(), registers_changed(), reinit_frame_cache(), fork_info::savedregs, SEEK_SET, and stop_pc.
Referenced by inferior_call_waitpid(), inferior_call_waitpid_cleanup(), linux_fork_context(), linux_fork_detach(), and linux_fork_mourn_inferior().
Definition at line 268 of file linux-fork.c.
References call_lseek(), fork_info::clobber_regs, fork_info::filepos, get_current_regcache(), fork_info::maxfd, fork_info::ptid, ptid_get_pid(), regcache_dup(), regcache_xfree(), fork_info::savedregs, SEEK_CUR, and xrealloc().
Referenced by checkpoint_command(), inferior_call_waitpid(), and linux_fork_context().
int forks_exist_p | ( | void | ) |
Definition at line 61 of file linux-fork.c.
Referenced by linux_nat_detach(), linux_nat_kill(), and linux_nat_mourn_inferior().
|
static |
Definition at line 92 of file linux-fork.c.
References fork_info::filepos, regcache_xfree(), fork_info::savedregs, and xfree().
Referenced by delete_fork(), and init_fork_list().
|
static |
Definition at line 627 of file linux-fork.c.
References current_inferior(), inferior::pid, thread_info::ptid, and ptid_get_pid().
Referenced by inf_has_multiple_threads().
|
static |
Definition at line 641 of file linux-fork.c.
References inf_has_multiple_thread_cb(), and iterate_over_threads().
Referenced by checkpoint_command().
Definition at line 431 of file linux-fork.c.
References call_function_by_hand(), do_cleanups(), find_fork_ptid(), find_function_in_inferior(), fork_load_infrun_state(), fork_save_infrun_state(), gdb_assert, get_current_arch(), inferior_call_waitpid_cleanup(), inferior_ptid, insert_breakpoints(), lookup_minimal_symbol(), make_cleanup(), ptid_equal(), remove_breakpoints(), value_as_long(), value_from_longest(), and value_from_pointer().
Referenced by delete_checkpoint_command().
|
static |
Definition at line 417 of file linux-fork.c.
References fork_load_infrun_state(), insert_breakpoints(), and remove_breakpoints().
Referenced by inferior_call_waitpid().
|
static |
Definition at line 553 of file linux-fork.c.
References _, find_pc_line(), fputs_filtered(), gdb_stdout, get_current_arch(), get_current_regcache(), inferior_ptid, int, symtab_and_line::line, lookup_minimal_symbol_by_pc(), MSYMBOL_LINKAGE_NAME, fork_info::next, fork_info::num, paddress(), parse_and_eval_long(), printf_filtered(), fork_info::ptid, ptid_equal(), putchar_filtered(), regcache_read_pc(), fork_info::savedregs, symtab_and_line::symtab, symtab_to_filename_for_display(), and target_pid_to_str().
Referenced by _initialize_linux_fork().
|
static |
Definition at line 202 of file linux-fork.c.
References free_fork(), and fork_info::next.
Referenced by _initialize_linux_fork(), and linux_fork_killall().
Definition at line 617 of file linux-fork.c.
References checkpointing_pid.
Referenced by linux_handle_extended_wait().
Definition at line 719 of file linux-fork.c.
References _, find_fork_ptid(), fork_load_infrun_state(), fork_save_infrun_state(), gdb_assert, get_selected_frame(), inferior_ptid, insert_breakpoints(), print_stack_frame(), printf_filtered(), remove_breakpoints(), SRC_AND_LOC, and target_pid_to_str().
Referenced by restart_command().
Definition at line 389 of file linux-fork.c.
References _, delete_fork(), error(), fork_load_infrun_state(), gdb_assert, inferior_ptid, fork_info::next, printf_filtered(), ptid_get_pid(), ptrace(), and target_pid_to_str().
Referenced by linux_nat_detach().
void linux_fork_killall | ( | void | ) |
Definition at line 323 of file linux-fork.c.
References init_fork_list(), fork_info::next, pid, fork_info::ptid, ptid_get_pid(), status, and WIFSTOPPED.
Referenced by linux_nat_kill().
void linux_fork_mourn_inferior | ( | void | ) |
Definition at line 355 of file linux-fork.c.
References _, delete_fork(), fork_load_infrun_state(), gdb_assert, inferior_ptid, fork_info::next, printf_filtered(), ptid_get_pid(), status, and target_pid_to_str().
Referenced by linux_nat_mourn_inferior().
|
static |
Definition at line 742 of file linux-fork.c.
References _, error(), find_fork_id(), linux_fork_context(), and parse_and_eval_long().
Referenced by _initialize_linux_fork().
|
static |
Definition at line 614 of file linux-fork.c.
Referenced by checkpoint_command(), and linux_fork_checkpointing_p().
struct fork_info* fork_list |
Definition at line 38 of file linux-fork.c.
Referenced by add_fork().
|
static |
Definition at line 39 of file linux-fork.c.
Referenced by add_fork().