GDBserver
|
#include "server.h"
#include "linux-low.h"
#include "linux-osdata.h"
#include "agent.h"
#include "nat/linux-nat.h"
#include "nat/linux-waitpid.h"
#include "gdb_wait.h"
#include <stdio.h>
#include <sys/ptrace.h>
#include "linux-ptrace.h"
#include "linux-procfs.h"
#include <signal.h>
#include <sys/ioctl.h>
#include <fcntl.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <sys/syscall.h>
#include <sched.h>
#include <ctype.h>
#include <pwd.h>
#include <sys/types.h>
#include <dirent.h>
#include "gdb_stat.h"
#include <sys/vfs.h>
#include <sys/uio.h>
#include "filestuff.h"
#include "tracepoint.h"
#include "hostio.h"
#include <elf.h>
Go to the source code of this file.
Classes | |
struct | Elf32_auxv_t |
struct | Elf64_auxv_t |
struct | simple_pid_list |
struct | pending_signals |
struct | counter |
struct | thread_resume_array |
struct | link_map_offsets |
Defines | |
#define | SPUFS_MAGIC 0x23c9b64e |
#define | O_LARGEFILE 0 |
#define | W_STOPCODE(sig) ((sig) << 8 | 0x7f) |
#define | __SIGRTMIN 32 |
#define | target_is_async_p() (linux_event_pipe[0] != -1) |
#define | use_linux_regsets 0 |
#define | regsets_fetch_inferior_registers(regsets_info, regcache) 1 |
#define | regsets_store_inferior_registers(regsets_info, regcache) 1 |
#define | usr_fetch_inferior_registers(regs_info, regcache, regno, all) do {} while (0) |
#define | usr_store_inferior_registers(regs_info, regcache, regno, all) do {} while (0) |
#define | linux_read_loadmap NULL |
Enumerations | |
enum | stopping_threads_kind { NOT_STOPPING_THREADS, STOPPING_THREADS, STOPPING_AND_SUSPENDING_THREADS } |
Functions | |
static void | add_to_pid_list (struct simple_pid_list **listp, int pid, int status) |
static int | pull_pid_from_list (struct simple_pid_list **listp, int pid, int *statusp) |
static void | linux_resume_one_lwp (struct lwp_info *lwp, int step, int signal, siginfo_t *info) |
static void | linux_resume (struct thread_resume *resume_info, size_t n) |
static void | stop_all_lwps (int suspend, struct lwp_info *except) |
static void | unstop_all_lwps (int unsuspend, struct lwp_info *except) |
static int | linux_wait_for_event (ptid_t ptid, int *wstat, int options) |
static void * | add_lwp (ptid_t ptid) |
static int | linux_stopped_by_watchpoint (void) |
static void | mark_lwp_dead (struct lwp_info *lwp, int wstat) |
static void | proceed_all_lwps (void) |
static int | finish_step_over (struct lwp_info *lwp) |
static CORE_ADDR | get_stop_pc (struct lwp_info *lwp) |
static int | kill_lwp (unsigned long lwpid, int signo) |
static int | can_hardware_single_step (void) |
static int | supports_breakpoints (void) |
static int | supports_fast_tracepoints (void) |
static int | lwp_in_step_range (struct lwp_info *lwp) |
static void | send_sigstop (struct lwp_info *lwp) |
static void | wait_for_sigstop (struct inferior_list_entry *entry) |
static int | elf_64_header_p (const Elf64_Ehdr *header, unsigned int *machine) |
static int | elf_64_file_p (const char *file, unsigned int *machine) |
int | linux_pid_exe_is_elf_64_file (int pid, unsigned int *machine) |
static void | delete_lwp (struct lwp_info *lwp) |
static struct process_info * | linux_add_process (int pid, int attached) |
static void | handle_extended_wait (struct lwp_info *event_child, int wstat) |
static CORE_ADDR | get_pc (struct lwp_info *lwp) |
static int | linux_create_inferior (char *program, char **allargs) |
static void | linux_attach_lwp_1 (unsigned long lwpid, int initial) |
void | linux_attach_lwp (unsigned long lwpid) |
static int | linux_attach (unsigned long pid) |
static int | second_thread_of_pid_p (struct inferior_list_entry *entry, void *args) |
static int | last_thread_of_process_p (struct thread_info *thread) |
static void | linux_kill_one_lwp (struct lwp_info *lwp) |
static int | kill_one_lwp_callback (struct inferior_list_entry *entry, void *args) |
static int | linux_kill (int pid) |
static int | get_detach_signal (struct thread_info *thread) |
static int | linux_detach_one_lwp (struct inferior_list_entry *entry, void *args) |
static int | linux_detach (int pid) |
static int | delete_lwp_callback (struct inferior_list_entry *entry, void *proc) |
static void | linux_mourn (struct process_info *process) |
static void | linux_join (int pid) |
static int | linux_thread_alive (ptid_t ptid) |
static int | status_pending_p_callback (struct inferior_list_entry *entry, void *arg) |
static int | same_lwp (struct inferior_list_entry *entry, void *data) |
struct lwp_info * | find_lwp_pid (ptid_t ptid) |
static struct lwp_info * | linux_wait_for_lwp (ptid_t ptid, int *wstatp, int options) |
static int | handle_tracepoints (struct lwp_info *lwp) |
static int | linux_fast_tracepoint_collecting (struct lwp_info *lwp, struct fast_tpoint_collect_status *status) |
static int | maybe_move_out_of_jump_pad (struct lwp_info *lwp, int *wstat) |
static void | enqueue_one_deferred_signal (struct lwp_info *lwp, int *wstat) |
static int | dequeue_one_deferred_signal (struct lwp_info *lwp, int *wstat) |
static int | cancel_breakpoint (struct lwp_info *lwp) |
static int | count_events_callback (struct inferior_list_entry *entry, void *data) |
static int | select_singlestep_lwp_callback (struct inferior_list_entry *entry, void *data) |
static int | select_event_lwp_callback (struct inferior_list_entry *entry, void *data) |
static int | cancel_breakpoints_callback (struct inferior_list_entry *entry, void *data) |
static void | linux_cancel_breakpoints (void) |
static void | select_event_lwp (struct lwp_info **orig_lp) |
static int | unsuspend_one_lwp (struct inferior_list_entry *entry, void *except) |
static void | unsuspend_all_lwps (struct lwp_info *except) |
static void | move_out_of_jump_pad_callback (struct inferior_list_entry *entry) |
static int | stuck_in_jump_pad_callback (struct inferior_list_entry *entry, void *data) |
static int | lwp_running (struct inferior_list_entry *entry, void *data) |
static ptid_t | linux_wait_1 (ptid_t ptid, struct target_waitstatus *ourstatus, int target_options) |
static void | linux_stabilize_threads (void) |
static void | async_file_flush (void) |
static void | async_file_mark (void) |
static ptid_t | linux_wait (ptid_t ptid, struct target_waitstatus *ourstatus, int target_options) |
void | linux_stop_lwp (struct lwp_info *lwp) |
static int | send_sigstop_callback (struct inferior_list_entry *entry, void *except) |
static int | suspend_and_send_sigstop_callback (struct inferior_list_entry *entry, void *except) |
static int | linux_set_resume_request (struct inferior_list_entry *entry, void *arg) |
static int | resume_status_pending_p (struct inferior_list_entry *entry, void *flag_p) |
static int | need_step_over_p (struct inferior_list_entry *entry, void *dummy) |
static int | start_step_over (struct lwp_info *lwp) |
static int | linux_resume_one_thread (struct inferior_list_entry *entry, void *arg) |
static int | proceed_one_lwp (struct inferior_list_entry *entry, void *except) |
static int | unsuspend_and_proceed_one_lwp (struct inferior_list_entry *entry, void *except) |
static int | linux_register_in_regsets (const struct regs_info *regs_info, int regno) |
void | linux_fetch_registers (struct regcache *regcache, int regno) |
void | linux_store_registers (struct regcache *regcache, int regno) |
static int | linux_read_memory (CORE_ADDR memaddr, unsigned char *myaddr, int len) |
static int | linux_write_memory (CORE_ADDR memaddr, const unsigned char *myaddr, int len) |
static void | linux_look_up_symbols (void) |
static void | linux_request_interrupt (void) |
static int | linux_read_auxv (CORE_ADDR offset, unsigned char *myaddr, unsigned int len) |
static int | linux_insert_point (char type, CORE_ADDR addr, int len) |
static int | linux_remove_point (char type, CORE_ADDR addr, int len) |
static CORE_ADDR | linux_stopped_data_address (void) |
static int | linux_qxfer_osdata (const char *annex, unsigned char *readbuf, unsigned const char *writebuf, CORE_ADDR offset, int len) |
static void | siginfo_fixup (siginfo_t *siginfo, void *inf_siginfo, int direction) |
static int | linux_xfer_siginfo (const char *annex, unsigned char *readbuf, unsigned const char *writebuf, CORE_ADDR offset, int len) |
static void | sigchld_handler (int signo) |
static int | linux_supports_non_stop (void) |
static int | linux_async (int enable) |
static int | linux_start_non_stop (int nonstop) |
static int | linux_supports_multi_process (void) |
static int | linux_supports_disable_randomization (void) |
static int | linux_supports_agent (void) |
static int | linux_supports_range_stepping (void) |
static int | spu_enumerate_spu_ids (long pid, unsigned char *buf, CORE_ADDR offset, int len) |
static int | linux_qxfer_spu (const char *annex, unsigned char *readbuf, unsigned const char *writebuf, CORE_ADDR offset, int len) |
static void | linux_process_qsupported (const char *query) |
static int | linux_supports_tracepoints (void) |
static CORE_ADDR | linux_read_pc (struct regcache *regcache) |
static void | linux_write_pc (struct regcache *regcache, CORE_ADDR pc) |
static int | linux_thread_stopped (struct thread_info *thread) |
static void | linux_pause_all (int freeze) |
static void | linux_unpause_all (int unfreeze) |
static int | linux_prepare_to_access_memory (void) |
static void | linux_done_accessing_memory (void) |
static int | linux_install_fast_tracepoint_jump_pad (CORE_ADDR tpoint, CORE_ADDR tpaddr, CORE_ADDR collector, CORE_ADDR lockaddr, ULONGEST orig_size, CORE_ADDR *jump_entry, CORE_ADDR *trampoline, ULONGEST *trampoline_size, unsigned char *jjump_pad_insn, ULONGEST *jjump_pad_insn_size, CORE_ADDR *adjusted_insn_addr, CORE_ADDR *adjusted_insn_addr_end, char *err) |
static struct emit_ops * | linux_emit_ops (void) |
static int | linux_get_min_fast_tracepoint_insn_len (void) |
static int | get_phdr_phnum_from_proc_auxv (const int pid, const int is_elf64, CORE_ADDR *phdr_memaddr, int *num_phdr) |
static CORE_ADDR | get_dynamic (const int pid, const int is_elf64) |
static CORE_ADDR | get_r_debug (const int pid, const int is_elf64) |
static int | read_one_ptr (CORE_ADDR memaddr, CORE_ADDR *ptr, int ptr_size) |
static int | linux_qxfer_libraries_svr4 (const char *annex, unsigned char *readbuf, unsigned const char *writebuf, CORE_ADDR offset, int len) |
static void | linux_init_signals () |
void | initialize_low (void) |
Variables | |
struct inferior_list | all_lwps |
struct simple_pid_list * | stopped_pids |
enum stopping_threads_kind | stopping_threads = NOT_STOPPING_THREADS |
int | using_threads = 1 |
static int | stabilizing_threads |
static int | linux_event_pipe [2] = { -1, -1 } |
ptid_t | step_over_bkpt |
static struct target_ops | linux_target_ops |
#define __SIGRTMIN 32 |
Definition at line 80 of file linux-low.c.
Referenced by enqueue_one_deferred_signal(), linux_create_inferior(), linux_init_signals(), and linux_wait_1().
#define linux_read_loadmap NULL |
Definition at line 5100 of file linux-low.c.
#define O_LARGEFILE 0 |
Definition at line 70 of file linux-low.c.
Referenced by linux_read_memory().
#define regsets_fetch_inferior_registers | ( | regsets_info, | |
regcache | |||
) | 1 |
Definition at line 4166 of file linux-low.c.
Referenced by linux_fetch_registers().
#define regsets_store_inferior_registers | ( | regsets_info, | |
regcache | |||
) | 1 |
Definition at line 4167 of file linux-low.c.
Referenced by linux_store_registers().
#define SPUFS_MAGIC 0x23c9b64e |
Definition at line 59 of file linux-low.c.
Referenced by spu_enumerate_spu_ids().
#define target_is_async_p | ( | ) | (linux_event_pipe[0] != -1) |
Definition at line 287 of file linux-low.c.
Referenced by linux_wait(), and sigchld_handler().
#define use_linux_regsets 0 |
Definition at line 4165 of file linux-low.c.
Referenced by linux_register_in_regsets().
#define usr_fetch_inferior_registers | ( | regs_info, | |
regcache, | |||
regno, | |||
all | |||
) | do {} while (0) |
Definition at line 4343 of file linux-low.c.
Referenced by linux_fetch_registers().
#define usr_store_inferior_registers | ( | regs_info, | |
regcache, | |||
regno, | |||
all | |||
) | do {} while (0) |
Definition at line 4344 of file linux-low.c.
Referenced by linux_store_registers().
#define W_STOPCODE | ( | sig | ) | ((sig) << 8 | 0x7f) |
Definition at line 74 of file linux-low.c.
Referenced by dequeue_one_deferred_signal(), and linux_stabilize_threads().
Definition at line 201 of file linux-low.c.
Definition at line 529 of file linux-low.c.
References add_inferior_to_list(), all_lwps, lwp_info::arch_private, lwp_info::head, inferior_list_entry::id, memset(), linux_target_ops::new_thread, the_low_target, and xmalloc().
Referenced by handle_extended_wait(), linux_attach_lwp_1(), and linux_create_inferior().
static void add_to_pid_list | ( | struct simple_pid_list ** | listp, |
int | pid, | ||
int | status | ||
) | [static] |
Definition at line 173 of file linux-low.c.
References simple_pid_list::next, simple_pid_list::pid, simple_pid_list::status, and xmalloc().
Referenced by linux_wait_for_lwp().
static void async_file_flush | ( | void | ) | [static] |
Definition at line 2743 of file linux-low.c.
References errno, and linux_event_pipe.
Referenced by async_file_mark(), and linux_wait().
static void async_file_mark | ( | void | ) | [static] |
Definition at line 2755 of file linux-low.c.
References async_file_flush(), errno, and linux_event_pipe.
Referenced by linux_async(), linux_wait(), and sigchld_handler().
static int can_hardware_single_step | ( | void | ) | [static] |
Definition at line 241 of file linux-low.c.
References linux_target_ops::breakpoint_reinsert_addr, and the_low_target.
Referenced by finish_step_over(), linux_resume_one_lwp(), and start_step_over().
static int cancel_breakpoint | ( | struct lwp_info * | lwp | ) | [static] |
Definition at line 1722 of file linux-low.c.
References linux_target_ops::breakpoint_at, current_inferior, debug_threads, linux_target_ops::decr_pc_after_break, get_lwp_thread, get_thread_regcache(), paddress(), ptid_of, linux_target_ops::set_pc, lwp_info::stop_pc, supports_breakpoints(), target_pid_to_str(), and the_low_target.
Referenced by cancel_breakpoints_callback().
static int cancel_breakpoints_callback | ( | struct inferior_list_entry * | entry, |
void * | data | ||
) | [static] |
Definition at line 2028 of file linux-low.c.
References cancel_breakpoint(), get_lwp_thread, thread_info::last_resume_kind, thread_info::last_status, lwp_info::status_pending, lwp_info::status_pending_p, lwp_info::stepping, and lwp_info::stopped_by_watchpoint.
Referenced by linux_cancel_breakpoints(), and linux_wait_1().
static int count_events_callback | ( | struct inferior_list_entry * | entry, |
void * | data | ||
) | [static] |
Definition at line 1965 of file linux-low.c.
References breakpoint_inserted_here(), gdb_assert, get_lwp_thread, thread_info::last_resume_kind, thread_info::last_status, lwp_info::status_pending, lwp_info::status_pending_p, and lwp_info::stop_pc.
Referenced by select_event_lwp().
static void delete_lwp | ( | struct lwp_info * | lwp | ) | [static] |
Definition at line 347 of file linux-low.c.
References all_lwps, lwp_info::arch_private, get_lwp_thread, lwp_info::head, remove_inferior(), and remove_thread().
Referenced by delete_lwp_callback(), linux_detach_one_lwp(), and linux_wait_for_event().
static int delete_lwp_callback | ( | struct inferior_list_entry * | entry, |
void * | proc | ||
) | [static] |
Definition at line 1165 of file linux-low.c.
References delete_lwp(), and pid_of.
Referenced by linux_mourn().
static int dequeue_one_deferred_signal | ( | struct lwp_info * | lwp, |
int * | wstat | ||
) | [static] |
Definition at line 1675 of file linux-low.c.
References debug_threads, lwpid_of, lwp_info::pending_signals_to_report, pending_signals::prev, PTRACE_TYPE_ARG3, pending_signals::signal, and W_STOPCODE.
Referenced by linux_set_resume_request(), and linux_wait_1().
static int elf_64_file_p | ( | const char * | file, |
unsigned int * | machine | ||
) | [static] |
Definition at line 315 of file linux-low.c.
References elf_64_header_p().
Referenced by linux_pid_exe_is_elf_64_file(), and linux_qxfer_libraries_svr4().
static int elf_64_header_p | ( | const Elf64_Ehdr * | header, |
unsigned int * | machine | ||
) | [static] |
Definition at line 295 of file linux-low.c.
Referenced by elf_64_file_p().
static void enqueue_one_deferred_signal | ( | struct lwp_info * | lwp, |
int * | wstat | ||
) | [static] |
Definition at line 1615 of file linux-low.c.
References __SIGRTMIN, debug_threads, pending_signals::info, lwpid_of, memset(), lwp_info::pending_signals_to_report, pending_signals::prev, PTRACE_TYPE_ARG3, pending_signals::signal, and xmalloc().
Referenced by linux_stabilize_threads(), linux_wait_1(), linux_wait_for_event(), and move_out_of_jump_pad_callback().
struct lwp_info* find_lwp_pid | ( | ptid_t | ptid | ) | [read] |
Definition at line 1266 of file linux-low.c.
References all_lwps, find_inferior(), and same_lwp().
Referenced by attach_thread(), linux_kill(), linux_thread_alive(), linux_wait_for_event(), linux_wait_for_lwp(), maybe_attach_thread(), ps_lgetregs(), wait_for_sigstop(), and x86_get_thread_area().
static int finish_step_over | ( | struct lwp_info * | lwp | ) | [static] |
Definition at line 3602 of file linux-low.c.
References lwp_info::bp_reinsert, can_hardware_single_step(), debug_threads, delete_reinsert_breakpoints(), null_ptid, reinsert_breakpoints_at(), and reinsert_fast_tracepoint_jumps_at().
Referenced by linux_wait_1(), and linux_wait_for_event().
static int get_detach_signal | ( | struct thread_info * | thread | ) | [static] |
Definition at line 1009 of file linux-low.c.
References debug_threads, gdb_signal_from_host(), gdb_signal_to_string(), get_thread_lwp, thread_info::last_status, lwp_info::last_status, program_signals, program_signals_p, ptid_of, lwp_info::status_pending, lwp_info::status_pending_p, and target_pid_to_str().
Referenced by linux_detach_one_lwp().
static CORE_ADDR get_dynamic | ( | const int | pid, |
const int | is_elf64 | ||
) | [static] |
Definition at line 5284 of file linux-low.c.
References gdb_assert, get_phdr_phnum_from_proc_auxv(), and linux_read_memory().
Referenced by get_r_debug().
Definition at line 462 of file linux-low.c.
References current_inferior, debug_threads, get_lwp_thread, linux_target_ops::get_pc, get_thread_regcache(), and the_low_target.
Referenced by get_stop_pc(), linux_resume_one_lwp(), need_step_over_p(), and start_step_over().
static int get_phdr_phnum_from_proc_auxv | ( | const int | pid, |
const int | is_elf64, | ||
CORE_ADDR * | phdr_memaddr, | ||
int * | num_phdr | ||
) | [static] |
Definition at line 5218 of file linux-low.c.
References Elf32_auxv_t::a_type, Elf64_auxv_t::a_type, Elf32_auxv_t::a_un, Elf64_auxv_t::a_un, Elf32_auxv_t::a_val, Elf64_auxv_t::a_val, warning(), and xsnprintf().
Referenced by get_dynamic().
static CORE_ADDR get_r_debug | ( | const int | pid, |
const int | is_elf64 | ||
) | [static] |
Definition at line 5361 of file linux-low.c.
References get_dynamic(), and linux_read_memory().
Referenced by linux_qxfer_libraries_svr4().
static CORE_ADDR get_stop_pc | ( | struct lwp_info * | lwp | ) | [static] |
Definition at line 507 of file linux-low.c.
References debug_threads, linux_target_ops::decr_pc_after_break, linux_target_ops::get_pc, get_pc(), lwp_info::last_status, lwp_info::stepping, lwp_info::stopped_by_watchpoint, and the_low_target.
Referenced by handle_extended_wait(), and linux_wait_for_lwp().
static void handle_extended_wait | ( | struct lwp_info * | event_child, |
int | wstat | ||
) | [static] |
Definition at line 380 of file linux-low.c.
References add_lwp(), add_thread(), get_stop_pc(), linux_resume_one_lwp(), lwpid_of, my_waitpid(), NOT_STOPPING_THREADS, perror_with_name(), pid_of, ptid_build(), PTRACE_TYPE_ARG3, pull_pid_from_list(), lwp_info::status_pending, lwp_info::status_pending_p, lwp_info::stepping, lwp_info::stop_expected, lwp_info::stop_pc, lwp_info::stopped, STOPPING_AND_SUSPENDING_THREADS, stopping_threads, lwp_info::suspended, and warning().
Referenced by linux_wait_for_event().
static int handle_tracepoints | ( | struct lwp_info * | lwp | ) | [static] |
Definition at line 1420 of file linux-low.c.
References lwp_info::collecting_fast_tracepoint, debug_threads, gdb_assert, get_lwp_thread, handle_tracepoint_bkpts(), stabilizing_threads, lwp_info::stop_pc, lwp_info::suspended, tracepoint_finished_step(), and tracepoint_was_hit().
Referenced by linux_wait_1().
void initialize_low | ( | void | ) |
Definition at line 5852 of file linux-low.c.
Referenced by main().
static int kill_lwp | ( | unsigned long | lwpid, |
int | signo | ||
) | [static] |
Definition at line 2797 of file linux-low.c.
References errno.
Referenced by linux_attach_lwp_1(), linux_detach_one_lwp(), linux_request_interrupt(), and send_sigstop().
static int kill_one_lwp_callback | ( | struct inferior_list_entry * | entry, |
void * | args | ||
) | [static] |
Definition at line 919 of file linux-low.c.
References debug_threads, get_thread_lwp, lwp_info::head, inferior_list_entry::id, linux_kill_one_lwp(), linux_wait_for_event(), lwpid_of, ptid_get_pid(), and target_pid_to_str().
Referenced by linux_kill().
static int last_thread_of_process_p | ( | struct thread_info * | thread | ) | [static] |
Definition at line 867 of file linux-low.c.
References all_threads, find_inferior(), counter::pid, ptid_get_pid(), and second_thread_of_pid_p().
Referenced by linux_wait_1(), and linux_wait_for_event().
static struct process_info* linux_add_process | ( | int | pid, |
int | attached | ||
) | [static, read] |
Definition at line 359 of file linux-low.c.
References add_process(), process_info_private::arch_private, process_info_private::new_inferior, linux_target_ops::new_process, process_info::private, the_low_target, and xcalloc().
Referenced by linux_attach(), and linux_create_inferior().
static int linux_async | ( | int | enable | ) | [static] |
Definition at line 4846 of file linux-low.c.
References add_file_handler(), async_file_mark(), debug_threads, delete_file_handler(), fatal(), handle_target_event(), and linux_event_pipe.
Referenced by linux_start_non_stop().
static int linux_attach | ( | unsigned long | pid | ) | [static] |
Definition at line 767 of file linux-low.c.
References debug_threads, dirent, find_thread_ptid(), thread_info::last_resume_kind, linux_add_process(), linux_attach_lwp_1(), linux_proc_get_tgid(), non_stop, and ptid_build().
void linux_attach_lwp | ( | unsigned long | lwpid | ) |
Definition at line 758 of file linux-low.c.
References linux_attach_lwp_1().
Referenced by attach_thread().
static void linux_attach_lwp_1 | ( | unsigned long | lwpid, |
int | initial | ||
) | [static] |
Definition at line 644 of file linux-low.c.
References add_lwp(), add_thread(), buffer_finish(), buffer_grow_str0, buffer_init(), current_inferior, debug_threads, errno, error(), get_thread_lwp, kill_lwp(), linux_proc_pid_is_stopped(), linux_ptrace_attach_warnings(), lwp_info::must_set_ptrace_flags, pid_of, ptid_build(), PTRACE_TYPE_ARG3, lwp_info::stop_expected, and strerror.
Referenced by linux_attach(), and linux_attach_lwp().
static void linux_cancel_breakpoints | ( | void | ) | [static] |
Definition at line 2064 of file linux-low.c.
References all_lwps, cancel_breakpoints_callback(), and find_inferior().
static int linux_create_inferior | ( | char * | program, |
char ** | allargs | ||
) | [static] |
Definition at line 550 of file linux-low.c.
References __SIGRTMIN, add_lwp(), add_thread(), close_most_fds(), disable_randomization, errno, linux_add_process(), lwp_info::must_set_ptrace_flags, perror_with_name(), ptid_build(), PTRACE_TYPE_ARG3, remote_connection_is_stdio(), strerror, and warning().
static int linux_detach | ( | int | pid | ) | [static] |
Definition at line 1131 of file linux-low.c.
References all_threads, find_inferior(), find_process_pid(), linux_detach_one_lwp(), target_ops::mourn, stabilize_threads, stop_all_lwps(), the_target, thread_db_detach(), and unstop_all_lwps().
static int linux_detach_one_lwp | ( | struct inferior_list_entry * | entry, |
void * | args | ||
) | [static] |
Definition at line 1089 of file linux-low.c.
References _, debug_threads, delete_lwp(), errno, error(), get_detach_signal(), get_lwp_thread, get_thread_lwp, inferior_list_entry::id, kill_lwp(), lwpid_of, linux_target_ops::prepare_to_resume, ptid_get_pid(), ptid_of, PTRACE_TYPE_ARG3, regcache_invalidate_thread(), lwp_info::stop_expected, strerror, target_pid_to_str(), and the_low_target.
Referenced by linux_detach().
static void linux_done_accessing_memory | ( | void | ) | [static] |
Definition at line 5170 of file linux-low.c.
References linux_unpause_all(), and non_stop.
static struct emit_ops* linux_emit_ops | ( | void | ) | [static, read] |
Definition at line 5201 of file linux-low.c.
References linux_target_ops::emit_ops, and the_low_target.
static int linux_fast_tracepoint_collecting | ( | struct lwp_info * | lwp, |
struct fast_tpoint_collect_status * | status | ||
) | [static] |
Definition at line 1464 of file linux-low.c.
References fast_tracepoint_collecting(), linux_target_ops::get_thread_area, lwpid_of, lwp_info::stop_pc, and the_low_target.
Referenced by linux_wait_1(), maybe_move_out_of_jump_pad(), and stuck_in_jump_pad_callback().
void linux_fetch_registers | ( | struct regcache * | regcache, |
int | regno | ||
) |
Definition at line 4350 of file linux-low.c.
References linux_target_ops::fetch_register, linux_register_in_regsets(), usrregs_info::num_regs, linux_target_ops::regs_info, regsets_fetch_inferior_registers, the_low_target, usr_fetch_inferior_registers, and regs_info::usrregs.
static int linux_get_min_fast_tracepoint_insn_len | ( | void | ) | [static] |
Definition at line 5210 of file linux-low.c.
References linux_target_ops::get_min_fast_tracepoint_insn_len, and the_low_target.
static void linux_init_signals | ( | ) | [static] |
static int linux_insert_point | ( | char | type, |
CORE_ADDR | addr, | ||
int | len | ||
) | [static] |
Definition at line 4651 of file linux-low.c.
References linux_target_ops::insert_point, and the_low_target.
static int linux_install_fast_tracepoint_jump_pad | ( | CORE_ADDR | tpoint, |
CORE_ADDR | tpaddr, | ||
CORE_ADDR | collector, | ||
CORE_ADDR | lockaddr, | ||
ULONGEST | orig_size, | ||
CORE_ADDR * | jump_entry, | ||
CORE_ADDR * | trampoline, | ||
ULONGEST * | trampoline_size, | ||
unsigned char * | jjump_pad_insn, | ||
ULONGEST * | jjump_pad_insn_size, | ||
CORE_ADDR * | adjusted_insn_addr, | ||
CORE_ADDR * | adjusted_insn_addr_end, | ||
char * | err | ||
) | [static] |
Definition at line 5179 of file linux-low.c.
References linux_target_ops::install_fast_tracepoint_jump_pad, and the_low_target.
static void linux_join | ( | int | pid | ) | [static] |
Definition at line 1197 of file linux-low.c.
References errno, and my_waitpid().
static int linux_kill | ( | int | pid | ) | [static] |
Definition at line 954 of file linux-low.c.
References all_threads, debug_threads, find_inferior(), find_lwp_pid(), find_process_pid(), lwp_info::head, inferior_list_entry::id, kill_one_lwp_callback(), linux_kill_one_lwp(), linux_wait_for_event(), lwpid_of, target_ops::mourn, pid_to_ptid(), stop_all_lwps(), the_target, and unstop_all_lwps().
static void linux_kill_one_lwp | ( | struct lwp_info * | lwp | ) | [static] |
Definition at line 880 of file linux-low.c.
References debug_threads, errno, lwpid_of, counter::pid, ptid_of, PTRACE_TYPE_ARG3, strerror, and target_pid_to_str().
Referenced by kill_one_lwp_callback(), and linux_kill().
static void linux_look_up_symbols | ( | void | ) | [static] |
Definition at line 4585 of file linux-low.c.
References current_process(), linux_supports_traceclone(), process_info::private, process_info_private::thread_db, and thread_db_init().
static void linux_mourn | ( | struct process_info * | process | ) | [static] |
Definition at line 1177 of file linux-low.c.
References all_lwps, process_info_private::arch_private, delete_lwp_callback(), find_inferior(), process_info::private, remove_process(), and thread_db_mourn().
static void linux_pause_all | ( | int | freeze | ) | [static] |
Definition at line 5145 of file linux-low.c.
References stop_all_lwps().
Referenced by linux_prepare_to_access_memory().
int linux_pid_exe_is_elf_64_file | ( | int | pid, |
unsigned int * | machine | ||
) |
Definition at line 338 of file linux-low.c.
References elf_64_file_p().
Referenced by tile_arch_setup(), x86_linux_read_description(), and x86_siginfo_fixup().
static int linux_prepare_to_access_memory | ( | void | ) | [static] |
Definition at line 5160 of file linux-low.c.
References linux_pause_all(), and non_stop.
static void linux_process_qsupported | ( | const char * | query | ) | [static] |
Definition at line 5104 of file linux-low.c.
References linux_target_ops::process_qsupported, and the_low_target.
static int linux_qxfer_libraries_svr4 | ( | const char * | annex, |
unsigned char * | readbuf, | ||
unsigned const char * | writebuf, | ||
CORE_ADDR | offset, | ||
int | len | ||
) | [static] |
Definition at line 5493 of file linux-low.c.
References current_inferior, current_process(), decode_address_to_semicolon(), elf_64_file_p(), get_r_debug(), get_thread_lwp, link_map_offsets::l_addr_offset, link_map_offsets::l_ld_offset, link_map_offsets::l_name_offset, link_map_offsets::l_next_offset, link_map_offsets::l_prev_offset, linux_read_memory(), lwpid_of, memcpy(), name, offset, process_info::private, process_info_private::r_debug, link_map_offsets::r_map_offset, link_map_offsets::r_version_offset, read_one_ptr(), strchr(), warning(), xfree(), xmalloc(), xml_escape_text(), xrealloc(), and xsnprintf().
static int linux_qxfer_osdata | ( | const char * | annex, |
unsigned char * | readbuf, | ||
unsigned const char * | writebuf, | ||
CORE_ADDR | offset, | ||
int | len | ||
) | [static] |
Definition at line 4734 of file linux-low.c.
References linux_common_xfer_osdata().
static int linux_qxfer_spu | ( | const char * | annex, |
unsigned char * | readbuf, | ||
unsigned const char * | writebuf, | ||
CORE_ADDR | offset, | ||
int | len | ||
) | [static] |
Definition at line 4984 of file linux-low.c.
References current_inferior, get_thread_lwp, lwpid_of, and spu_enumerate_spu_ids().
static int linux_read_auxv | ( | CORE_ADDR | offset, |
unsigned char * | myaddr, | ||
unsigned int | len | ||
) | [static] |
Definition at line 4623 of file linux-low.c.
References current_inferior, get_thread_lwp, lwpid_of, and xsnprintf().
static int linux_read_memory | ( | CORE_ADDR | memaddr, |
unsigned char * | myaddr, | ||
int | len | ||
) | [static] |
Definition at line 4412 of file linux-low.c.
References current_inferior, errno, get_thread_lwp, lwpid_of, memcpy(), O_LARGEFILE, PTRACE_TYPE_ARG3, and PTRACE_XFER_TYPE.
Referenced by get_dynamic(), get_r_debug(), linux_qxfer_libraries_svr4(), and read_one_ptr().
static CORE_ADDR linux_read_pc | ( | struct regcache * | regcache | ) | [static] |
Definition at line 5120 of file linux-low.c.
References linux_target_ops::get_pc, and the_low_target.
static int linux_register_in_regsets | ( | const struct regs_info * | regs_info, |
int | regno | ||
) | [static] |
Definition at line 4175 of file linux-low.c.
References regs_info::regset_bitmap, and use_linux_regsets.
Referenced by linux_fetch_registers(), and linux_store_registers().
static int linux_remove_point | ( | char | type, |
CORE_ADDR | addr, | ||
int | len | ||
) | [static] |
Definition at line 4661 of file linux-low.c.
References linux_target_ops::remove_point, and the_low_target.
static void linux_request_interrupt | ( | void | ) | [static] |
Definition at line 4601 of file linux-low.c.
References cont_thread, current_inferior, get_thread_lwp, kill_lwp(), lwpid_of, minus_one_ptid, null_ptid, ptid_equal(), and signal_pid.
static void linux_resume | ( | struct thread_resume * | resume_info, |
size_t | n | ||
) | [static] |
Definition at line 3757 of file linux-low.c.
References all_lwps, all_threads, debug_threads, find_inferior(), linux_resume_one_thread(), linux_set_resume_request(), lwp_info::need_step_over, need_step_over_p(), non_stop, resume_status_pending_p(), start_step_over(), and supports_breakpoints().
Referenced by linux_wait_1().
static void linux_resume_one_lwp | ( | struct lwp_info * | lwp, |
int | step, | ||
int | signal, | ||
siginfo_t * | info | ||
) | [static] |
Definition at line 3096 of file linux-low.c.
References lwp_info::bp_reinsert, can_hardware_single_step(), lwp_info::collecting_fast_tracepoint, current_inferior, debug_threads, errno, fatal(), gdb_assert, get_lwp_thread, linux_target_ops::get_pc, get_pc(), get_thread_regcache(), pending_signals::info, lwpid_of, memcpy(), memset(), paddress(), lwp_info::pending_signals, perror_with_name(), linux_target_ops::prepare_to_resume, pending_signals::prev, PTRACE_TYPE_ARG3, regcache_invalidate_thread(), release_while_stepping_state_list(), pending_signals::signal, stabilizing_threads, lwp_info::status_pending_p, lwp_info::stepping, lwp_info::stop_expected, lwp_info::stop_pc, lwp_info::stopped, lwp_info::stopped_by_watchpoint, lwp_info::suspended, the_low_target, and xmalloc().
Referenced by handle_extended_wait(), linux_resume_one_thread(), linux_wait_1(), linux_wait_for_event(), move_out_of_jump_pad_callback(), proceed_one_lwp(), and start_step_over().
static int linux_resume_one_thread | ( | struct inferior_list_entry * | entry, |
void * | arg | ||
) | [static] |
Definition at line 3645 of file linux-low.c.
References debug_threads, get_thread_lwp, pending_signals::info, thread_resume::kind, thread_info::last_status, lwp_info::last_status, linux_resume_one_lwp(), lwpid_of, memset(), lwp_info::pending_signals, lwp_info::pending_signals_to_report, pending_signals::prev, PTRACE_TYPE_ARG3, lwp_info::resume, send_sigstop(), thread_resume::sig, pending_signals::signal, lwp_info::status_pending_p, lwp_info::stopped, and xmalloc().
Referenced by linux_resume().
static int linux_set_resume_request | ( | struct inferior_list_entry * | entry, |
void * | arg | ||
) | [static] |
Definition at line 3309 of file linux-low.c.
References debug_threads, dequeue_one_deferred_signal(), get_thread_lwp, inferior_list_entry::id, thread_resume::kind, thread_info::last_resume_kind, thread_info::last_status, lwpid_of, minus_one_ptid, thread_resume_array::n, pid_of, ptid_equal(), ptid_get_lwp(), ptid_get_pid(), ptid_is_pid(), lwp_info::resume, thread_resume_array::resume, lwp_info::status_pending, lwp_info::status_pending_p, thread_resume::step_range_end, lwp_info::step_range_end, thread_resume::step_range_start, lwp_info::step_range_start, lwp_info::stopped, and thread_resume::thread.
Referenced by linux_resume().
static void linux_stabilize_threads | ( | void | ) | [static] |
Definition at line 2183 of file linux-low.c.
References all_lwps, current_inferior, debug_threads, enqueue_one_deferred_signal(), find_inferior(), for_each_inferior(), gdb_signal_to_host(), get_thread_lwp, thread_info::last_resume_kind, linux_wait_1(), lwp_running(), lwpid_of, minus_one_ptid, move_out_of_jump_pad_callback(), stabilizing_threads, stuck_in_jump_pad_callback(), lwp_info::suspended, unsuspend_one_lwp(), and W_STOPCODE.
static int linux_start_non_stop | ( | int | nonstop | ) | [static] |
Definition at line 4894 of file linux-low.c.
References linux_async().
void linux_stop_lwp | ( | struct lwp_info * | lwp | ) |
Definition at line 2823 of file linux-low.c.
References send_sigstop().
Referenced by debug_reg_change_callback(), update_debug_registers_callback(), update_registers_callback(), and update_watch_registers_callback().
static int linux_stopped_by_watchpoint | ( | void | ) | [static] |
Definition at line 4671 of file linux-low.c.
References current_inferior, get_thread_lwp, and lwp_info::stopped_by_watchpoint.
static CORE_ADDR linux_stopped_data_address | ( | void | ) | [static] |
Definition at line 4679 of file linux-low.c.
References current_inferior, get_thread_lwp, and lwp_info::stopped_data_address.
void linux_store_registers | ( | struct regcache * | regcache, |
int | regno | ||
) |
Definition at line 4383 of file linux-low.c.
References linux_register_in_regsets(), linux_target_ops::regs_info, regsets_store_inferior_registers, the_low_target, usr_store_inferior_registers, and regs_info::usrregs.
static int linux_supports_agent | ( | void | ) | [static] |
Definition at line 4918 of file linux-low.c.
static int linux_supports_disable_randomization | ( | void | ) | [static] |
Definition at line 4908 of file linux-low.c.
static int linux_supports_multi_process | ( | void | ) | [static] |
Definition at line 4902 of file linux-low.c.
static int linux_supports_non_stop | ( | void | ) | [static] |
Definition at line 4840 of file linux-low.c.
static int linux_supports_range_stepping | ( | void | ) | [static] |
Definition at line 4924 of file linux-low.c.
References linux_target_ops::supports_range_stepping, and the_low_target.
static int linux_supports_tracepoints | ( | void | ) | [static] |
Definition at line 5111 of file linux-low.c.
References linux_target_ops::supports_tracepoints, and the_low_target.
static int linux_thread_alive | ( | ptid_t | ptid | ) | [static] |
Definition at line 1210 of file linux-low.c.
References lwp_info::dead, and find_lwp_pid().
Referenced by wait_for_sigstop().
static int linux_thread_stopped | ( | struct thread_info * | thread | ) | [static] |
Definition at line 5137 of file linux-low.c.
References get_thread_lwp.
static void linux_unpause_all | ( | int | unfreeze | ) | [static] |
Definition at line 5154 of file linux-low.c.
References unstop_all_lwps().
Referenced by linux_done_accessing_memory().
static ptid_t linux_wait | ( | ptid_t | ptid, |
struct target_waitstatus * | ourstatus, | ||
int | target_options | ||
) | [static] |
Definition at line 2770 of file linux-low.c.
References async_file_flush(), async_file_mark(), debug_threads, linux_wait_1(), null_ptid, ptid_equal(), target_is_async_p, and target_pid_to_str().
static ptid_t linux_wait_1 | ( | ptid_t | ptid, |
struct target_waitstatus * | ourstatus, | ||
int | target_options | ||
) | [static] |
Definition at line 2254 of file linux-low.c.
References __SIGRTMIN, agent_loaded_p(), all_lwps, all_threads, linux_target_ops::breakpoint_at, breakpoint_here(), breakpoint_inserted_here(), cancel_breakpoints, cancel_breakpoints_callback(), check_breakpoints(), lwp_info::collecting_fast_tracepoint, cont_thread, current_inferior, current_process(), debug_threads, delete_breakpoint(), dequeue_one_deferred_signal(), enqueue_one_deferred_signal(), lwp_info::exit_jump_pad_bkpt, find_inferior(), find_inferior_id(), finish_step_over(), gdb_assert, gdb_breakpoint_here(), gdb_condition_true_at_breakpoint(), gdb_no_commands_at_breakpoint(), gdb_signal_from_host(), get_lwp_thread, get_thread_lwp, get_thread_regcache(), handle_tracepoints(), thread_resume::kind, thread_info::last_resume_kind, last_thread_of_process_p(), linux_fast_tracepoint_collecting(), linux_resume(), linux_resume_one_lwp(), linux_wait_for_event(), lwp_in_step_range(), lwpid_of, maybe_move_out_of_jump_pad(), minus_one_ptid, lwp_info::need_step_over, non_stop, null_ptid, paddress(), pass_signals, proceed_all_lwps(), ptid_equal(), ptid_of, PTRACE_TYPE_ARG3, run_breakpoint_commands(), select_event_lwp(), linux_target_ops::set_pc, thread_resume::sig, stabilize_threads, stabilizing_threads, lwp_info::status_pending, lwp_info::status_pending_p, lwp_info::step_range_end, lwp_info::step_range_start, lwp_info::stepping, stop_all_lwps(), lwp_info::stop_pc, lwp_info::stopped_by_watchpoint, supports_breakpoints(), supports_fast_tracepoints(), lwp_info::suspended, target_pid_to_str(), the_low_target, thread_resume::thread, unstop_all_lwps(), and unsuspend_all_lwps().
Referenced by linux_stabilize_threads(), and linux_wait().
static int linux_wait_for_event | ( | ptid_t | ptid, |
int * | wstat, | ||
int | options | ||
) | [static] |
Definition at line 1776 of file linux-low.c.
References all_lwps, all_threads, lwp_info::collecting_fast_tracepoint, current_inferior, debug_threads, delete_lwp(), enqueue_one_deferred_signal(), error(), fatal(), find_inferior(), find_lwp_pid(), finish_step_over(), get_lwp_thread, get_thread_lwp, handle_extended_wait(), inferior_list::head, thread_info::last_resume_kind, last_thread_of_process_p(), linux_enable_event_reporting(), linux_resume_one_lwp(), linux_wait_for_lwp(), lwpid_of, mark_lwp_dead(), minus_one_ptid, lwp_info::must_set_ptrace_flags, non_stop, NOT_STOPPING_THREADS, ptid_equal(), ptid_get_pid(), ptid_is_pid(), ptid_of, lwp_info::status_pending, lwp_info::status_pending_p, status_pending_p_callback(), lwp_info::stepping, lwp_info::stop_expected, stopping_threads, lwp_info::suspended, and unstop_all_lwps().
Referenced by kill_one_lwp_callback(), linux_kill(), linux_wait_1(), and wait_for_sigstop().
static struct lwp_info* linux_wait_for_lwp | ( | ptid_t | ptid, |
int * | wstatp, | ||
int | options | ||
) | [static, read] |
Definition at line 1272 of file linux-low.c.
References add_to_pid_list(), linux_target_ops::arch_setup, current_inferior, debug_threads, errno, find_lwp_pid(), find_process_pid(), get_lwp_thread, linux_target_ops::get_pc, get_stop_pc(), get_thread_regcache(), lwp_info::last_status, minus_one_ptid, my_waitpid(), process_info_private::new_inferior, perror_with_name(), pid_of, pid_to_ptid(), process_info::private, ptid_equal(), ptid_get_lwp(), lwp_info::stop_pc, lwp_info::stopped, linux_target_ops::stopped_by_watchpoint, lwp_info::stopped_by_watchpoint, linux_target_ops::stopped_data_address, lwp_info::stopped_data_address, target_pid_to_str(), and the_low_target.
Referenced by linux_wait_for_event().
static int linux_write_memory | ( | CORE_ADDR | memaddr, |
const unsigned char * | myaddr, | ||
int | len | ||
) | [static] |
Definition at line 4501 of file linux-low.c.
References current_inferior, debug_threads, errno, get_thread_lwp, lwpid_of, memcpy(), PTRACE_TYPE_ARG3, and PTRACE_XFER_TYPE.
static void linux_write_pc | ( | struct regcache * | regcache, |
CORE_ADDR | pc | ||
) | [static] |
Definition at line 5129 of file linux-low.c.
References gdb_assert, linux_target_ops::set_pc, and the_low_target.
static int linux_xfer_siginfo | ( | const char * | annex, |
unsigned char * | readbuf, | ||
unsigned const char * | writebuf, | ||
CORE_ADDR | offset, | ||
int | len | ||
) | [static] |
Definition at line 4764 of file linux-low.c.
References current_inferior, debug_threads, get_thread_lwp, lwpid_of, memcpy(), PTRACE_TYPE_ARG3, and siginfo_fixup().
static int lwp_in_step_range | ( | struct lwp_info * | lwp | ) | [static] |
Definition at line 268 of file linux-low.c.
References lwp_info::step_range_start, and lwp_info::stop_pc.
Referenced by linux_wait_1().
static int lwp_running | ( | struct inferior_list_entry * | entry, |
void * | data | ||
) | [static] |
Definition at line 3058 of file linux-low.c.
References lwp_info::dead, and lwp_info::stopped.
Referenced by linux_stabilize_threads().
static void mark_lwp_dead | ( | struct lwp_info * | lwp, |
int | wstat | ||
) | [static] |
Definition at line 2886 of file linux-low.c.
References lwp_info::dead, lwp_info::status_pending, lwp_info::status_pending_p, lwp_info::stop_expected, and lwp_info::stopped.
Referenced by linux_wait_for_event(), and wait_for_sigstop().
static int maybe_move_out_of_jump_pad | ( | struct lwp_info * | lwp, |
int * | wstat | ||
) | [static] |
Definition at line 1488 of file linux-low.c.
References fast_tpoint_collect_status::adjusted_insn_addr, fast_tpoint_collect_status::adjusted_insn_addr_end, agent_loaded_p(), cancel_breakpoints, lwp_info::collecting_fast_tracepoint, current_inferior, debug_threads, delete_breakpoint(), lwp_info::exit_jump_pad_bkpt, force_unlock_trace_buffer(), gdb_assert, get_lwp_thread, get_thread_regcache(), linux_fast_tracepoint_collecting(), lwpid_of, PTRACE_TYPE_ARG3, set_breakpoint_at(), linux_target_ops::set_pc, stop_all_lwps(), lwp_info::stop_pc, supports_fast_tracepoints(), lwp_info::suspended, the_low_target, fast_tpoint_collect_status::tpoint_addr, and unstop_all_lwps().
Referenced by linux_wait_1(), and move_out_of_jump_pad_callback().
static void move_out_of_jump_pad_callback | ( | struct inferior_list_entry * | entry | ) | [static] |
Definition at line 3017 of file linux-low.c.
References debug_threads, enqueue_one_deferred_signal(), gdb_assert, gdb_breakpoint_here(), get_lwp_thread, thread_info::last_resume_kind, linux_resume_one_lwp(), lwpid_of, maybe_move_out_of_jump_pad(), lwp_info::status_pending, lwp_info::status_pending_p, lwp_info::stop_pc, lwp_info::stopped, lwp_info::stopped_by_watchpoint, and lwp_info::suspended.
Referenced by linux_stabilize_threads().
static int need_step_over_p | ( | struct inferior_list_entry * | entry, |
void * | dummy | ||
) | [static] |
Definition at line 3400 of file linux-low.c.
References breakpoint_here(), current_inferior, debug_threads, fast_tracepoint_jump_here(), gdb_assert, gdb_breakpoint_here(), gdb_condition_true_at_breakpoint(), gdb_no_commands_at_breakpoint(), get_lwp_thread, get_pc(), thread_info::last_resume_kind, lwpid_of, lwp_info::need_step_over, paddress(), lwp_info::status_pending_p, lwp_info::stop_pc, lwp_info::stopped, and lwp_info::suspended.
Referenced by linux_resume(), and proceed_all_lwps().
static void proceed_all_lwps | ( | void | ) | [static] |
Definition at line 3914 of file linux-low.c.
References all_lwps, debug_threads, find_inferior(), lwpid_of, lwp_info::need_step_over, need_step_over_p(), proceed_one_lwp(), start_step_over(), and supports_breakpoints().
Referenced by linux_wait_1().
static int proceed_one_lwp | ( | struct inferior_list_entry * | entry, |
void * | except | ||
) | [static] |
Definition at line 3819 of file linux-low.c.
References lwp_info::collecting_fast_tracepoint, debug_threads, gdb_assert, get_lwp_thread, thread_info::last_resume_kind, thread_info::last_status, linux_resume_one_lwp(), lwpid_of, lwp_info::pending_signals_to_report, send_sigstop(), lwp_info::status_pending_p, lwp_info::stopped, and lwp_info::suspended.
Referenced by proceed_all_lwps(), unstop_all_lwps(), and unsuspend_and_proceed_one_lwp().
static int pull_pid_from_list | ( | struct simple_pid_list ** | listp, |
int | pid, | ||
int * | statusp | ||
) | [static] |
Definition at line 184 of file linux-low.c.
References simple_pid_list::next, simple_pid_list::status, and xfree().
Referenced by handle_extended_wait().
static int read_one_ptr | ( | CORE_ADDR | memaddr, |
CORE_ADDR * | ptr, | ||
int | ptr_size | ||
) | [static] |
Definition at line 5438 of file linux-low.c.
References gdb_assert_not_reached, and linux_read_memory().
Referenced by linux_qxfer_libraries_svr4().
static int resume_status_pending_p | ( | struct inferior_list_entry * | entry, |
void * | flag_p | ||
) | [static] |
Definition at line 3379 of file linux-low.c.
References lwp_info::resume, and lwp_info::status_pending_p.
Referenced by linux_resume().
static int same_lwp | ( | struct inferior_list_entry * | entry, |
void * | data | ||
) | [static] |
Definition at line 1249 of file linux-low.c.
References inferior_list_entry::id, ptid_get_lwp(), and ptid_get_pid().
Referenced by find_lwp_pid().
static int second_thread_of_pid_p | ( | struct inferior_list_entry * | entry, |
void * | args | ||
) | [static] |
Definition at line 853 of file linux-low.c.
References counter::count, inferior_list_entry::id, counter::pid, and ptid_get_pid().
Referenced by last_thread_of_process_p().
static void select_event_lwp | ( | struct lwp_info ** | orig_lp | ) | [static] |
Definition at line 2072 of file linux-low.c.
References all_lwps, count_events_callback(), debug_threads, find_inferior(), ptid_of, select_event_lwp_callback(), select_singlestep_lwp_callback(), and target_pid_to_str().
Referenced by linux_wait_1().
static int select_event_lwp_callback | ( | struct inferior_list_entry * | entry, |
void * | data | ||
) | [static] |
Definition at line 2006 of file linux-low.c.
References breakpoint_inserted_here(), gdb_assert, get_lwp_thread, thread_info::last_resume_kind, thread_info::last_status, lwp_info::status_pending, lwp_info::status_pending_p, and lwp_info::stop_pc.
Referenced by select_event_lwp().
static int select_singlestep_lwp_callback | ( | struct inferior_list_entry * | entry, |
void * | data | ||
) | [static] |
Definition at line 1989 of file linux-low.c.
References get_lwp_thread, thread_info::last_resume_kind, thread_info::last_status, and lwp_info::status_pending_p.
Referenced by select_event_lwp().
static void send_sigstop | ( | struct lwp_info * | lwp | ) | [static] |
Definition at line 2829 of file linux-low.c.
References debug_threads, kill_lwp(), lwpid_of, and lwp_info::stop_expected.
Referenced by linux_resume_one_thread(), linux_stop_lwp(), proceed_one_lwp(), and send_sigstop_callback().
static int send_sigstop_callback | ( | struct inferior_list_entry * | entry, |
void * | except | ||
) | [static] |
Definition at line 2853 of file linux-low.c.
References send_sigstop(), and lwp_info::stopped.
Referenced by stop_all_lwps(), and suspend_and_send_sigstop_callback().
static void sigchld_handler | ( | int | signo | ) | [static] |
Definition at line 4817 of file linux-low.c.
References async_file_mark(), debug_threads, errno, and target_is_async_p.
Referenced by initialize_low().
static void siginfo_fixup | ( | siginfo_t * | siginfo, |
void * | inf_siginfo, | ||
int | direction | ||
) | [static] |
Definition at line 4745 of file linux-low.c.
References memcpy(), linux_target_ops::siginfo_fixup, and the_low_target.
Referenced by linux_xfer_siginfo().
static int spu_enumerate_spu_ids | ( | long | pid, |
unsigned char * | buf, | ||
CORE_ADDR | offset, | ||
int | len | ||
) | [static] |
Definition at line 4934 of file linux-low.c.
References dirent, and SPUFS_MAGIC.
Referenced by linux_qxfer_spu().
static int start_step_over | ( | struct lwp_info * | lwp | ) | [static] |
Definition at line 3547 of file linux-low.c.
References lwp_info::bp_reinsert, linux_target_ops::breakpoint_reinsert_addr, can_hardware_single_step(), current_inferior, debug_threads, gdb_assert, get_lwp_thread, get_pc(), lwp_info::head, inferior_list_entry::id, linux_resume_one_lwp(), lwpid_of, set_reinsert_breakpoint(), stop_all_lwps(), lwp_info::suspended, the_low_target, uninsert_breakpoints_at(), and uninsert_fast_tracepoint_jumps_at().
Referenced by linux_resume(), and proceed_all_lwps().
static int status_pending_p_callback | ( | struct inferior_list_entry * | entry, |
void * | arg | ||
) | [static] |
Definition at line 1225 of file linux-low.c.
References get_lwp_thread, lwp_info::head, inferior_list_entry::id, thread_info::last_resume_kind, thread_info::last_status, minus_one_ptid, ptid_equal(), ptid_get_pid(), and lwp_info::status_pending_p.
Referenced by linux_wait_for_event().
static void stop_all_lwps | ( | int | suspend, |
struct lwp_info * | except | ||
) | [static] |
Definition at line 3074 of file linux-low.c.
References all_lwps, find_inferior(), for_each_inferior(), gdb_assert, NOT_STOPPING_THREADS, send_sigstop_callback(), STOPPING_AND_SUSPENDING_THREADS, STOPPING_THREADS, stopping_threads, suspend_and_send_sigstop_callback(), and wait_for_sigstop().
Referenced by linux_detach(), linux_kill(), linux_pause_all(), linux_wait_1(), maybe_move_out_of_jump_pad(), and start_step_over().
static int stuck_in_jump_pad_callback | ( | struct inferior_list_entry * | entry, |
void * | data | ||
) | [static] |
Definition at line 2999 of file linux-low.c.
References agent_loaded_p(), gdb_assert, gdb_breakpoint_here(), get_lwp_thread, thread_info::last_resume_kind, linux_fast_tracepoint_collecting(), lwp_info::stop_pc, lwp_info::stopped, lwp_info::stopped_by_watchpoint, supports_fast_tracepoints(), and lwp_info::suspended.
Referenced by linux_stabilize_threads().
static int supports_breakpoints | ( | void | ) | [static] |
Definition at line 250 of file linux-low.c.
References linux_target_ops::get_pc, and the_low_target.
Referenced by cancel_breakpoint(), linux_resume(), linux_wait_1(), and proceed_all_lwps().
static int supports_fast_tracepoints | ( | void | ) | [static] |
Definition at line 260 of file linux-low.c.
References linux_target_ops::install_fast_tracepoint_jump_pad, and the_low_target.
Referenced by linux_wait_1(), maybe_move_out_of_jump_pad(), and stuck_in_jump_pad_callback().
static int suspend_and_send_sigstop_callback | ( | struct inferior_list_entry * | entry, |
void * | except | ||
) | [static] |
Definition at line 2871 of file linux-low.c.
References send_sigstop_callback(), and lwp_info::suspended.
Referenced by stop_all_lwps().
static void unstop_all_lwps | ( | int | unsuspend, |
struct lwp_info * | except | ||
) | [static] |
Definition at line 3952 of file linux-low.c.
References all_lwps, debug_threads, find_inferior(), lwpid_of, proceed_one_lwp(), and unsuspend_and_proceed_one_lwp().
Referenced by linux_detach(), linux_kill(), linux_unpause_all(), linux_wait_1(), linux_wait_for_event(), and maybe_move_out_of_jump_pad().
static void unsuspend_all_lwps | ( | struct lwp_info * | except | ) | [static] |
Definition at line 2139 of file linux-low.c.
References all_lwps, find_inferior(), and unsuspend_one_lwp().
Referenced by linux_wait_1().
static int unsuspend_and_proceed_one_lwp | ( | struct inferior_list_entry * | entry, |
void * | except | ||
) | [static] |
Definition at line 3896 of file linux-low.c.
References gdb_assert, proceed_one_lwp(), and lwp_info::suspended.
Referenced by unstop_all_lwps().
static int unsuspend_one_lwp | ( | struct inferior_list_entry * | entry, |
void * | except | ||
) | [static] |
Definition at line 2121 of file linux-low.c.
References gdb_assert, and lwp_info::suspended.
Referenced by linux_stabilize_threads(), and unsuspend_all_lwps().
static void wait_for_sigstop | ( | struct inferior_list_entry * | entry | ) | [static] |
Definition at line 2903 of file linux-low.c.
References current_inferior, debug_threads, find_lwp_pid(), lwp_info::head, inferior_list_entry::id, linux_thread_alive(), linux_wait_for_event(), lwpid_of, mark_lwp_dead(), non_stop, null_ptid, pid_to_ptid(), set_desired_inferior(), lwp_info::status_pending, lwp_info::status_pending_p, and lwp_info::stopped.
Referenced by stop_all_lwps().
struct inferior_list all_lwps |
Definition at line 150 of file linux-low.c.
Referenced by aarch64_notify_debug_reg_change(), add_lwp(), arm_insert_point(), arm_remove_point(), delete_lwp(), find_lwp_pid(), i386_dr_low_set_addr(), i386_dr_low_set_control(), linux_cancel_breakpoints(), linux_mourn(), linux_resume(), linux_stabilize_threads(), linux_wait_1(), linux_wait_for_event(), mips_insert_point(), mips_remove_point(), proceed_all_lwps(), select_event_lwp(), stop_all_lwps(), unstop_all_lwps(), and unsuspend_all_lwps().
int linux_event_pipe[2] = { -1, -1 } [static] |
Definition at line 284 of file linux-low.c.
Referenced by async_file_flush(), async_file_mark(), and linux_async().
struct target_ops linux_target_ops [static] |
Definition at line 5750 of file linux-low.c.
int stabilizing_threads [static] |
Definition at line 221 of file linux-low.c.
Referenced by handle_tracepoints(), linux_resume_one_lwp(), linux_stabilize_threads(), and linux_wait_1().
Definition at line 1767 of file linux-low.c.
struct simple_pid_list* stopped_pids |
Definition at line 167 of file linux-low.c.
Definition at line 214 of file linux-low.c.
Referenced by handle_extended_wait(), linux_wait_for_event(), and stop_all_lwps().
int using_threads = 1 |
Definition at line 217 of file linux-low.c.
Referenced by prepare_resume_reply().