GDBserver

Classes | Macros | Enumerations | Functions | Variables
linux-low.c File Reference
`#include "server.h"`
`#include "linux-low.h"`
`#include "nat/linux-osdata.h"`
`#include "agent.h"`
`#include "tdesc.h"`
`#include "rsp-low.h"`
`#include "signals-state-save-restore.h"`
`#include "nat/linux-nat.h"`
`#include "nat/linux-waitpid.h"`
`#include "gdb_wait.h"`
`#include "nat/gdb_ptrace.h"`
`#include "nat/linux-ptrace.h"`
`#include "nat/linux-procfs.h"`
`#include "nat/linux-personality.h"`
`#include <signal.h>`
`#include <sys/ioctl.h>`
`#include <fcntl.h>`
`#include <unistd.h>`
`#include <sys/syscall.h>`
`#include <sched.h>`
`#include <ctype.h>`
`#include <pwd.h>`
`#include <sys/types.h>`
`#include <dirent.h>`
`#include <sys/stat.h>`
`#include <sys/vfs.h>`
`#include <sys/uio.h>`
`#include "filestuff.h"`
`#include "tracepoint.h"`
`#include "hostio.h"`
`#include <inttypes.h>`
`#include "common-inferior.h"`
`#include "nat/fork-inferior.h"`
`#include "environ.h"`
`#include <elf.h>`
`#include "nat/linux-namespaces.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 | link_map_offsets

## Macros
#define | SPUFS_MAGIC 0x23c9b64e
#define | O_LARGEFILE 0
#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
ptid_t | ptid_of_lwp (struct lwp_info *lwp)
void | lwp_set_arch_private_info (struct lwp_info *lwp, struct arch_lwp_info *info)
struct arch_lwp_info * | lwp_arch_private_info (struct lwp_info *lwp)
int | lwp_is_stopped (struct lwp_info *lwp)
enum target_stop_reason | lwp_stop_reason (struct lwp_info *lwp)
int | lwp_is_stepping (struct lwp_info *lwp)
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 void | unsuspend_all_lwps (struct lwp_info *except)
static int | linux_wait_for_event_filtered (ptid_t wait_ptid, ptid_t filter_ptid, int *wstat, int options)
static int | linux_wait_for_event (ptid_t ptid, int *wstat, int options)
static struct lwp_info * | add_lwp (ptid_t ptid)
static void | linux_mourn (struct process_info *process)
static int | linux_stopped_by_watchpoint (void)
static void | mark_lwp_dead (struct lwp_info *lwp, int wstat)
static int | lwp_is_marked_dead (struct lwp_info *lwp)
static void | proceed_all_lwps (void)
static int | finish_step_over (struct lwp_info *lwp)
static int | kill_lwp (unsigned long lwpid, int signo)
static void | enqueue_pending_signal (struct lwp_info *lwp, int signal, siginfo_t *info)
static void | complete_ongoing_step_over (void)
static int | linux_low_ptrace_options (int attached)
static int | check_ptrace_stopped_lwp_gone (struct lwp_info *lp)
static void | proceed_one_lwp (thread_info *thread, lwp_info *except)
static int | can_hardware_single_step (void)
static int | can_software_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 (void)
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 CORE_ADDR | get_pc (struct lwp_info *lwp)
static void | linux_arch_setup (void)
static void | linux_arch_setup_thread (struct thread_info *thread)
static int | handle_extended_wait (struct lwp_info **orig_event_lwp, int wstat)
static void | get_syscall_trapinfo (struct lwp_info *lwp, int *sysno)
static int | check_stopped_by_watchpoint (struct lwp_info *child)
static int | save_stop_reason (struct lwp_info *lwp)
static void | linux_ptrace_fun ()
static int | linux_create_inferior (const char *program, const std::vector< char *> &program_args)
static void | linux_post_create_inferior (void)
int | linux_attach_lwp (ptid_t ptid)
static int | attach_proc_task_lwp_callback (ptid_t ptid)
static void | async_file_mark (void)
static int | linux_attach (unsigned long pid)
static int | last_thread_of_process_p (int pid)
static void | linux_kill_one_lwp (struct lwp_info *lwp)
static void | kill_wait_lwp (struct lwp_info *lwp)
static void | kill_one_lwp_callback (thread_info *thread, int pid)
static int | linux_kill (int pid)
static int | get_detach_signal (struct thread_info *thread)
static void | linux_detach_one_lwp (struct lwp_info *lwp)
static void | linux_detach_lwp_callback (thread_info *thread)
static int | linux_detach (int pid)
static void | linux_join (int pid)
static int | linux_thread_alive (ptid_t ptid)
static int | thread_still_has_status_pending_p (struct thread_info *thread)
static int | lwp_resumed (struct lwp_info *lwp)
static bool | status_pending_p_callback (thread_info *thread, ptid_t ptid)
struct lwp_info * | find_lwp_pid (ptid_t ptid)
static int | num_lwps (int pid)
struct lwp_info * | iterate_over_lwps (ptid_t filter, iterate_over_lwps_ftype callback, void *data)
static void | check_zombie_leaders (void)
static bool | not_stopped_callback (thread_info *thread, ptid_t filter)
static void | lwp_suspended_inc (struct lwp_info *lwp)
static void | lwp_suspended_decr (struct lwp_info *lwp)
static int | handle_tracepoints (struct lwp_info *lwp)
static fast_tpoint_collect_result | 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 struct lwp_info * | linux_low_filter_event (int lwpid, int wstat)
static int | maybe_hw_step (struct thread_info *thread)
static void | resume_stopped_resumed_lwps (thread_info *thread)
static void | select_event_lwp (struct lwp_info **orig_lp)
static void | move_out_of_jump_pad_callback (thread_info *thread)
static bool | stuck_in_jump_pad_callback (thread_info *thread)
static bool | lwp_running (thread_info *thread)
static ptid_t | linux_wait_1 (ptid_t ptid, struct target_waitstatus *ourstatus, int target_options)
static void | linux_stabilize_threads (void)
static ptid_t | ignore_event (struct target_waitstatus *ourstatus)
static ptid_t | filter_exit_event (struct lwp_info *event_child, struct target_waitstatus *ourstatus)
static int | gdb_catching_syscalls_p (struct lwp_info *event_child)
static int | gdb_catch_this_syscall_p (struct lwp_info *event_child)
static void | async_file_flush (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 void | send_sigstop (thread_info *thread, lwp_info *except)
static void | suspend_and_send_sigstop (thread_info *thread, lwp_info *except)
static void | install_software_single_step_breakpoints (struct lwp_info *lwp)
static int | single_step (struct lwp_info *lwp)
static int | lwp_signal_can_be_delivered (struct lwp_info *lwp)
static void | linux_resume_one_lwp_throw (struct lwp_info *lwp, int step, int signal, siginfo_t *info)
static void | linux_set_resume_request (thread_info *thread, thread_resume *resume, size_t n)
static bool | resume_status_pending_p (thread_info *thread)
static bool | need_step_over_p (thread_info *thread)
static int | start_step_over (struct lwp_info *lwp)
static void | linux_resume_one_thread (thread_info *thread, bool leave_all_stopped)
static void | unsuspend_and_proceed_one_lwp (thread_info *thread, lwp_info *except)
static int | linux_register_in_regsets (const struct regs_info *regs_info, int regno)
static void | linux_fetch_registers (struct regcache *regcache, int regno)
static 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_supports_z_point_type (char z_type)
static int | linux_insert_point (enum raw_bkpt_type type, CORE_ADDR addr, int size, struct raw_breakpoint *bp)
static int | linux_remove_point (enum raw_bkpt_type type, CORE_ADDR addr, int size, struct raw_breakpoint *bp)
static int | linux_stopped_by_sw_breakpoint (void)
static int | linux_supports_stopped_by_sw_breakpoint (void)
static int | linux_stopped_by_hw_breakpoint (void)
static int | linux_supports_stopped_by_hw_breakpoint (void)
static int | linux_supports_hardware_single_step (void)
static int | linux_supports_software_single_step (void)
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, gdb_byte *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_fork_events (void)
static int | linux_supports_vfork_events (void)
static int | linux_supports_exec_events (void)
static void | linux_handle_new_gdb_connection (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 (char **features, int count)
static int | linux_supports_catch_syscall (void)
static int | linux_get_ipa_tdesc_idx (void)
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)
ptid_t | current_lwp_ptid (void)
static int | linux_breakpoint_kind_from_pc (CORE_ADDR *pcptr)
static const gdb_byte * | linux_sw_breakpoint_from_kind (int kind, int *size)
static int | linux_breakpoint_kind_from_current_state (CORE_ADDR *pcptr)
void | linux_set_pc_32bit (struct regcache *regcache, CORE_ADDR pc)
CORE_ADDR | linux_get_pc_32bit (struct regcache *regcache)
void | linux_set_pc_64bit (struct regcache *regcache, CORE_ADDR pc)
CORE_ADDR | linux_get_pc_64bit (struct regcache *regcache)
void | initialize_low (void)

## Variables
int | have_ptrace_getregset = -1
struct simple_pid_list * | stopped_pids
enum stopping_threads_kind | stopping_threads = NOT_STOPPING_THREADS
int | using_threads = 1
static int | stabilizing_threads
ptid_t | step_over_bkpt
static int | linux_event_pipe [2] = { -1, -1 }
static struct target_ops | linux_target_ops

## Macro Definition Documentation

## ◆ linux_read_loadmap

#define linux_read_loadmap NULL

Definition at line 6546 of file linux-low.c.

## ◆ O_LARGEFILE

#define O_LARGEFILE 0

Definition at line 74 of file linux-low.c.

Referenced by linux_read_memory().

## ◆ regsets_fetch_inferior_registers

#define regsets_fetch_inferior_registers | ( |  | regsets_info,
|  |  | regcache
| ) |  | 1

Definition at line 5489 of file linux-low.c.

Referenced by linux_fetch_registers().

## ◆ regsets_store_inferior_registers

#define regsets_store_inferior_registers | ( |  | regsets_info,
|  |  | regcache
| ) |  | 1

Definition at line 5490 of file linux-low.c.

Referenced by linux_store_registers().

## ◆ SPUFS_MAGIC

#define SPUFS_MAGIC 0x23c9b64e

Definition at line 63 of file linux-low.c.

Referenced by spu_enumerate_spu_ids().

## ◆ target_is_async_p

#define target_is_async_p | ( |  | ) | (linux_event_pipe[0] != -1)

Definition at line 349 of file linux-low.c.

Referenced by linux_async(), linux_resume(), linux_start_non_stop(), linux_wait(), and sigchld_handler().

## ◆ use_linux_regsets

#define use_linux_regsets 0

Definition at line 5488 of file linux-low.c.

Referenced by linux_register_in_regsets().

## ◆ usr_fetch_inferior_registers

#define usr_fetch_inferior_registers | ( |  | regs_info,
|  |  | regcache,
|  |  | regno,
|  |  | all
| ) |  | do {} while (0)

Definition at line 5666 of file linux-low.c.

Referenced by linux_fetch_registers().

## ◆ usr_store_inferior_registers

#define usr_store_inferior_registers | ( |  | regs_info,
|  |  | regcache,
|  |  | regno,
|  |  | all
| ) |  | do {} while (0)

Definition at line 5667 of file linux-low.c.

Referenced by linux_store_registers().

## Enumeration Type Documentation

## ◆ stopping_threads_kind

enum stopping_threads_kind

Enumerator
NOT_STOPPING_THREADS |
STOPPING_THREADS |
STOPPING_AND_SUSPENDING_THREADS |

Definition at line 239 of file linux-low.c.

## Function Documentation

## ◆ add_lwp()

static struct lwp_info * add_lwp | ( | ptid_t | ptid | ) |
| static

Definition at line 942 of file linux-low.c.

References add_thread(), linux_target_ops::new_thread, the_low_target, lwp_info::thread, lwp_info::waitstatus, and XCNEW.

Referenced by handle_extended_wait(), linux_attach_lwp(), linux_create_inferior(), and linux_low_filter_event().

## ◆ add_to_pid_list()

static void add_to_pid_list | ( | struct simple_pid_list ** | listp,
|  | int | pid,
|  | int | status
| ) |  |
| static

Definition at line 211 of file linux-low.c.

References simple_pid_list::next, simple_pid_list::pid, simple_pid_list::status, and XNEW.

Referenced by linux_low_filter_event().

## ◆ async_file_flush()

static void async_file_flush | ( | void |  | ) |
| static

Definition at line 3834 of file linux-low.c.

References errno, and linux_event_pipe.

Referenced by async_file_mark(), and linux_wait().

## ◆ async_file_mark()

static void async_file_mark | ( | void |  | ) |
| static

Definition at line 3846 of file linux-low.c.

References async_file_flush(), errno, and linux_event_pipe.

Referenced by ignore_event(), linux_async(), linux_attach(), linux_resume(), linux_wait(), and sigchld_handler().

## ◆ attach_proc_task_lwp_callback()

static int attach_proc_task_lwp_callback | ( | ptid_t | ptid | ) |
| static

Definition at line 1133 of file linux-low.c.

References _, debug_printf(), debug_threads, find_thread_ptid(), linux_attach_lwp(), linux_proc_pid_is_gone(), linux_ptrace_attach_fail_reason_string(), ptid_get_lwp(), strerror(), and warning().

Referenced by linux_attach().

## ◆ can_hardware_single_step()

static int can_hardware_single_step | ( | void |  | ) |
| static

Definition at line 291 of file linux-low.c.

References linux_target_ops::supports_hardware_single_step, and the_low_target.

Referenced by finish_step_over(), linux_resume_one_lwp_throw(), linux_supports_hardware_single_step(), maybe_hw_step(), and single_step().

## ◆ can_software_single_step()

static int can_software_single_step | ( | void |  | ) |
| static

Definition at line 303 of file linux-low.c.

References linux_target_ops::get_next_pcs, and the_low_target.

Referenced by handle_extended_wait(), linux_supports_range_stepping(), linux_supports_software_single_step(), linux_wait_1(), need_step_over_p(), proceed_one_lwp(), and single_step().

## ◆ check_ptrace_stopped_lwp_gone()

static int check_ptrace_stopped_lwp_gone | ( | struct lwp_info * | lp | ) |
| static

Definition at line 4471 of file linux-low.c.

References gdb_assert, get_lwp_thread, linux_proc_pid_is_trace_stopped_nowarn(), lwpid_of(), lwp_info::status_pending_p, lwp_info::stop_reason, and lwp_info::stopped.

Referenced by linux_detach_one_lwp(), and linux_resume_one_lwp().

## ◆ check_stopped_by_watchpoint()

static int check_stopped_by_watchpoint | ( | struct lwp_info * | child | ) |
| static

Definition at line 2293 of file linux-low.c.

References current_thread, get_lwp_thread, lwp_info::stop_reason, linux_target_ops::stopped_by_watchpoint, linux_target_ops::stopped_data_address, lwp_info::stopped_data_address, and the_low_target.

Referenced by save_stop_reason().

## ◆ check_zombie_leaders()

static void check_zombie_leaders | ( | void |  | ) |
| static

Definition at line 1865 of file linux-low.c.

References debug_printf(), debug_threads, delete_lwp(), find_lwp_pid(), for_each_process(), last_thread_of_process_p(), linux_proc_pid_is_zombie(), num_lwps(), pid_of(), pid_to_ptid(), and lwp_info::stopped.

Referenced by linux_wait_for_event_filtered().

## ◆ complete_ongoing_step_over()

static void complete_ongoing_step_over | ( | void |  | ) |
| static

Definition at line 4887 of file linux-low.c.

References __WALL, debug_printf(), debug_threads, find_lwp_pid(), finish_step_over(), gdb_assert, linux_wait_for_event_filtered(), minus_one_ptid, null_ptid, ptid_equal(), step_over_bkpt, and unsuspend_all_lwps().

Referenced by linux_detach().

## ◆ current_lwp_ptid()

ptid_t current_lwp_ptid | ( | void |  | ) |

Definition at line 7358 of file linux-low.c.

References current_thread, and ptid_of().

Referenced by aarch64_notify_debug_reg_change(), aarch64_point_is_aligned(), x86_linux_dr_get_addr(), x86_linux_dr_get_control(), x86_linux_dr_get_status(), x86_linux_dr_set_addr(), and x86_linux_dr_set_control().

## ◆ delete_lwp()

static void delete_lwp | ( | struct lwp_info * | lwp | ) |
| static

Definition at line 409 of file linux-low.c.

References lwp_info::arch_private, debug_printf(), debug_threads, linux_target_ops::delete_thread, free(), gdb_assert, get_lwp_thread, lwpid_of(), remove_thread(), and the_low_target.

Referenced by check_zombie_leaders(), filter_exit_event(), linux_detach_one_lwp(), and linux_low_filter_event().

## ◆ dequeue_one_deferred_signal()

static int dequeue_one_deferred_signal | ( | struct lwp_info * | lwp,
|  | int * | wstat
| ) |  |
| static

Definition at line 2235 of file linux-low.c.

References debug_printf(), debug_threads, free(), get_lwp_thread, lwpid_of(), lwp_info::pending_signals_to_report, pending_signals::prev, ptrace(), PTRACE_SETSIGINFO, PTRACE_TYPE_ARG3, pending_signals::signal, W_STOPCODE, and WSTOPSIG.

Referenced by linux_set_resume_request(), and linux_wait_1().

## ◆ elf_64_file_p()

static int elf_64_file_p | ( | const char * | file,
|  | unsigned int * | machine
| ) |  |
| static

Definition at line 377 of file linux-low.c.

References elf_64_header_p().

Referenced by linux_pid_exe_is_elf_64_file(), and linux_qxfer_libraries_svr4().

## ◆ elf_64_header_p()

static int elf_64_header_p | ( | const Elf64_Ehdr * | header,
|  | unsigned int * | machine
| ) |  |
| static

Definition at line 357 of file linux-low.c.

Referenced by elf_64_file_p().

## ◆ enqueue_one_deferred_signal()

static void enqueue_one_deferred_signal | ( | struct lwp_info * | lwp,
|  | int * | wstat
| ) |  |
| static

Definition at line 2176 of file linux-low.c.

References __SIGRTMIN, debug_printf(), debug_threads, get_lwp_thread, pending_signals::info, lwpid_of(), lwp_info::pending_signals_to_report, pending_signals::prev, ptrace(), PTRACE_GETSIGINFO, PTRACE_TYPE_ARG3, pending_signals::signal, WSTOPSIG, and XCNEW.

Referenced by linux_stabilize_threads(), linux_wait_1(), linux_wait_for_event_filtered(), and move_out_of_jump_pad_callback().

## ◆ enqueue_pending_signal()

static void enqueue_pending_signal | ( | struct lwp_info * | lwp,
|  | int | signal,
|  | siginfo_t * | info
| ) |  |
| static

Definition at line 4184 of file linux-low.c.

References pending_signals::info, memset(), lwp_info::pending_signals, pending_signals::prev, pending_signals::signal, and XNEW.

Referenced by linux_resume_one_lwp_throw(), linux_resume_one_thread(), and linux_wait_1().

## ◆ filter_exit_event()

static ptid_t filter_exit_event | ( | struct lwp_info * | event_child,
|  | struct target_waitstatus * | ourstatus
| ) |  |
| static

Definition at line 3042 of file linux-low.c.

References delete_lwp(), get_lwp_thread, last_thread_of_process_p(), pid_of(), ptid_of(), and report_thread_events.

Referenced by linux_wait_1().

## ◆ find_lwp_pid()

struct lwp_info* find_lwp_pid | ( | ptid_t | ptid | ) |

Definition at line 1812 of file linux-low.c.

References find_thread(), get_thread_lwp, thread_info::id, ptid_t::lwp(), ptid_t::pid(), and lwp_info::thread.

Referenced by arm_new_fork(), attach_thread(), check_zombie_leaders(), complete_ongoing_step_over(), linux_attach(), linux_detach(), linux_kill(), linux_low_filter_event(), linux_thread_alive(), linux_wait_for_event_filtered(), maybe_attach_thread(), ppc_get_thread_area(), ps_lgetregs(), and x86_get_thread_area().

## ◆ finish_step_over()

static int finish_step_over | ( | struct lwp_info * | lwp | ) |
| static

Definition at line 4843 of file linux-low.c.

References lwp_info::bp_reinsert, can_hardware_single_step(), current_thread, debug_printf(), debug_threads, delete_single_step_breakpoints(), gdb_assert, get_lwp_thread, has_single_step_breakpoints(), null_ptid, reinsert_breakpoints_at(), reinsert_fast_tracepoint_jumps_at(), and step_over_bkpt.

Referenced by complete_ongoing_step_over(), linux_low_filter_event(), and linux_wait_1().

## ◆ gdb_catch_this_syscall_p()

static int gdb_catch_this_syscall_p | ( | struct lwp_info * | event_child | ) |
| static

Definition at line 3075 of file linux-low.c.

References ANY_SYSCALL, get_lwp_thread, get_syscall_trapinfo(), get_thread_process(), and process_info::syscalls_to_catch.

Referenced by linux_wait_1().

## ◆ gdb_catching_syscalls_p()

static int gdb_catching_syscalls_p | ( | struct lwp_info * | event_child | ) |
| static

Definition at line 3063 of file linux-low.c.

References get_lwp_thread, get_thread_process(), and process_info::syscalls_to_catch.

Referenced by linux_resume_one_lwp_throw().

## ◆ get_detach_signal()

static int get_detach_signal | ( | struct thread_info * | thread | ) |
| static

Definition at line 1423 of file linux-low.c.

References debug_printf(), debug_threads, gdb_signal_from_host(), gdb_signal_to_string(), get_thread_lwp, thread_info::last_status, lwp_info::last_status, linux_is_extended_waitstatus(), program_signals, program_signals_p, ptid_of(), lwp_info::status_pending, lwp_info::status_pending_p, target_pid_to_str(), lwp_info::thread, WIFSTOPPED, and WSTOPSIG.

Referenced by linux_detach_one_lwp().

## ◆ get_dynamic()

static CORE_ADDR get_dynamic | ( | const int | pid,
|  | const int | is_elf64
| ) |  |
| static

Definition at line 6746 of file linux-low.c.

References alloca(), gdb_assert, get_phdr_phnum_from_proc_auxv(), and linux_read_memory().

Referenced by get_r_debug().

## ◆ get_pc()

static CORE_ADDR get_pc | ( | struct lwp_info * | lwp | ) |
| static

Definition at line 747 of file linux-low.c.

References current_thread, debug_printf(), debug_threads, get_lwp_thread, linux_target_ops::get_pc, get_thread_regcache(), and the_low_target.

Referenced by linux_low_filter_event(), linux_resume_one_lwp_throw(), need_step_over_p(), save_stop_reason(), start_step_over(), and thread_still_has_status_pending_p().

## ◆ get_phdr_phnum_from_proc_auxv()

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 6680 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().

## ◆ get_r_debug()

static CORE_ADDR get_r_debug | ( | const int | pid,
|  | const int | is_elf64
| ) |  |
| static

Definition at line 6823 of file linux-low.c.

References get_dynamic(), and linux_read_memory().

Referenced by linux_qxfer_libraries_svr4().

## ◆ get_syscall_trapinfo()

static void get_syscall_trapinfo | ( | struct lwp_info * | lwp,
|  | int * | sysno
| ) |  |
| static

Definition at line 773 of file linux-low.c.

References current_thread, debug_printf(), debug_threads, get_lwp_thread, linux_target_ops::get_syscall_trapinfo, get_thread_regcache(), the_low_target, and UNKNOWN_SYSCALL.

Referenced by gdb_catch_this_syscall_p(), and linux_wait_1().

## ◆ handle_extended_wait()

static int handle_extended_wait | ( | struct lwp_info ** | orig_event_lwp,
|  | int | wstat
| ) |  |
| static

Definition at line 475 of file linux-low.c.

References _, __WALL, add_lwp(), allocate_target_description(), process_info::attached, lwp_info::bp_reinsert, can_software_single_step(), clone_all_breakpoints(), copy_target_description(), current_thread, debug_printf(), debug_threads, delete_single_step_breakpoints(), lwp_info::fork_relative, gdb_assert, get_lwp_thread, get_thread_process(), has_single_step_breakpoints(), internal_error(), thread_info::last_resume_kind, thread_info::last_status, linux_add_process(), linux_arch_setup_thread(), linux_mourn(), linux_proc_pid_to_exec_file(), linux_ptrace_get_extended_event(), lwpid_of(), lwp_info::must_set_ptrace_flags, my_waitpid(), linux_target_ops::new_fork, perror_with_name(), pid_of(), ptid_build(), ptid_get_lwp(), ptid_get_pid(), ptid_of(), ptrace(), PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK, PTRACE_EVENT_VFORK_DONE, PTRACE_GETEVENTMSG, PTRACE_TYPE_ARG3, pull_pid_from_list(), reinsert_single_step_breakpoints(), report_exec_events, report_thread_events, lwp_info::status_pending, lwp_info::status_pending_p, lwp_info::stop_expected, lwp_info::stopped, stopped_pids, STOPPING_AND_SUSPENDING_THREADS, stopping_threads, lwp_info::suspended, lwp_info::syscall_state, process_info::syscalls_to_catch, process_info::tdesc, the_low_target, thread_db_notice_clone(), uninsert_single_step_breakpoints(), lwp_info::waitstatus, warning(), WIFSTOPPED, WSTOPSIG, and xstrdup().

Referenced by linux_low_filter_event().

## ◆ handle_tracepoints()

static int handle_tracepoints | ( | struct lwp_info * | lwp | ) |
| static

Definition at line 1976 of file linux-low.c.

References lwp_info::collecting_fast_tracepoint, debug_printf(), debug_threads, gdb_assert, get_lwp_thread, handle_tracepoint_bkpts(), lwp_suspended_decr(), lwp_suspended_inc(), not_collecting, stabilizing_threads, lwp_info::stop_pc, lwp_info::suspended, tracepoint_finished_step(), and tracepoint_was_hit().

Referenced by linux_wait_1().

## ◆ ignore_event()

static ptid_t ignore_event | ( | struct target_waitstatus * | ourstatus | ) |
| static

Definition at line 3025 of file linux-low.c.

References async_file_mark(), and null_ptid.

Referenced by linux_wait_1().

## ◆ initialize_low()

void initialize_low | ( | void |  | ) |

Definition at line 7567 of file linux-low.c.

Referenced by captured_main().

## ◆ install_software_single_step_breakpoints()

static void install_software_single_step_breakpoints | ( | struct lwp_info * | lwp | ) |
| static

Definition at line 4200 of file linux-low.c.

References current_ptid, current_thread, do_cleanups(), get_lwp_thread, linux_target_ops::get_next_pcs, get_thread_regcache(), make_cleanup_restore_current_thread(), set_single_step_breakpoint(), and the_low_target.

Referenced by proceed_one_lwp(), and single_step().

## ◆ iterate_over_lwps()

struct lwp_info* iterate_over_lwps | ( | ptid_t | filter,
|  | iterate_over_lwps_ftype | callback,
|  | void * | data
| ) |  |

Definition at line 1844 of file linux-low.c.

References find_thread(), get_thread_lwp, and lwp_info::thread.

Referenced by aarch64_notify_debug_reg_change(), x86_linux_dr_set_addr(), and x86_linux_dr_set_control().

## ◆ kill_lwp()

static int kill_lwp | ( | unsigned long | lwpid,
|  | int | signo
| ) |  |
| static

Definition at line 3891 of file linux-low.c.

References errno, and perror_with_name().

Referenced by linux_attach_lwp(), linux_detach_one_lwp(), linux_kill_one_lwp(), and send_sigstop().

## ◆ kill_one_lwp_callback()

static void kill_one_lwp_callback | ( | thread_info * | thread,
|  | int | pid
| ) |  |
| static

Definition at line 1358 of file linux-low.c.

References debug_printf(), debug_threads, get_thread_lwp, thread_info::id, kill_wait_lwp(), lwpid_of(), target_pid_to_str(), and lwp_info::thread.

Referenced by linux_kill().

## ◆ kill_wait_lwp()

static void kill_wait_lwp | ( | struct lwp_info * | lwp | ) |
| static

Definition at line 1314 of file linux-low.c.

References __WCLONE, debug_printf(), debug_threads, errno, get_lwp_thread, linux_kill_one_lwp(), my_waitpid(), perror_with_name(), ptid_get_lwp(), ptid_get_pid(), ptid_of(), and WIFSTOPPED.

Referenced by kill_one_lwp_callback(), and linux_kill().

## ◆ last_thread_of_process_p()

static int last_thread_of_process_p | ( | int | pid | ) |
| static

Definition at line 1245 of file linux-low.c.

References find_thread(), and lwp_info::thread.

Referenced by check_zombie_leaders(), filter_exit_event(), and linux_low_filter_event().

## ◆ linux_add_process()

static struct process_info* linux_add_process | ( | int | pid,
|  | int | attached
| ) |  |
| static

Definition at line 430 of file linux-low.c.

References add_process(), process_info_private::arch_private, process_info::attached, linux_target_ops::new_process, process_info::pid, process_info::priv, the_low_target, and XCNEW.

Referenced by handle_extended_wait(), linux_attach(), and linux_create_inferior().

## ◆ linux_arch_setup()

static void linux_arch_setup | ( | void |  | ) |
| static

Definition at line 448 of file linux-low.c.

References linux_target_ops::arch_setup, and the_low_target.

Referenced by linux_arch_setup_thread(), and linux_post_create_inferior().

## ◆ linux_arch_setup_thread()

static void linux_arch_setup_thread | ( | struct thread_info * | thread | ) |
| static

Definition at line 456 of file linux-low.c.

References current_thread, and linux_arch_setup().

Referenced by handle_extended_wait(), and linux_low_filter_event().

## ◆ linux_async()

static int linux_async | ( | int | enable | ) |
| static

Definition at line 6225 of file linux-low.c.

References add_file_handler(), async_file_mark(), debug_printf(), debug_threads, delete_file_handler(), fcntl, handle_target_event(), linux_event_pipe, O_NONBLOCK, target_is_async_p, and warning().

Referenced by linux_start_non_stop().

## ◆ linux_attach()

static int linux_attach | ( | unsigned long | pid | ) |
| static

Definition at line 1178 of file linux-low.c.

References __WALL, async_file_mark(), attach_proc_task_lwp_callback(), error(), find_lwp_pid(), find_thread_ptid(), gdb_assert, thread_info::last_resume_kind, linux_add_process(), linux_attach_lwp(), linux_proc_attach_tgid_threads(), linux_ptrace_attach_fail_reason_string(), linux_wait_for_event_filtered(), non_stop, pid_to_ptid(), ptid_build(), lwp_info::status_pending, lwp_info::status_pending_p, process_info::tdesc, WIFSTOPPED, and WSTOPSIG.

## ◆ linux_attach_lwp()

int linux_attach_lwp | ( | ptid_t | ptid | ) |

Definition at line 1047 of file linux-low.c.

References add_lwp(), debug_printf(), debug_threads, errno, kill_lwp(), linux_proc_pid_is_stopped(), lwp_info::must_set_ptrace_flags, ptid_get_lwp(), ptrace(), PTRACE_TYPE_ARG3, PTRACE_TYPE_ARG4, and lwp_info::stop_expected.

Referenced by attach_proc_task_lwp_callback(), attach_thread(), and linux_attach().

## ◆ linux_breakpoint_kind_from_current_state()

static int linux_breakpoint_kind_from_current_state | ( | CORE_ADDR * | pcptr | ) |
| static

Definition at line 7388 of file linux-low.c.

References linux_target_ops::breakpoint_kind_from_current_state, linux_breakpoint_kind_from_pc(), and the_low_target.

## ◆ linux_breakpoint_kind_from_pc()

static int linux_breakpoint_kind_from_pc | ( | CORE_ADDR * | pcptr | ) |
| static

Definition at line 7366 of file linux-low.c.

References linux_target_ops::breakpoint_kind_from_pc, default_breakpoint_kind_from_pc(), and the_low_target.

Referenced by linux_breakpoint_kind_from_current_state().

## ◆ linux_create_inferior()

static int linux_create_inferior | ( | const char * | program,
|  | const std::vector< char *> & | program_args
| ) |  |
| static

Definition at line 995 of file linux-low.c.

References add_lwp(), disable_randomization, gdb_environ::envp(), fork_inferior(), get_environ(), linux_add_process(), linux_ptrace_fun(), lwp_info::must_set_ptrace_flags, post_fork_inferior(), program_args, ptid_build(), string, and stringify_argv().

## ◆ linux_detach()

static int linux_detach | ( | int | pid | ) |
| static

Definition at line 1601 of file linux-low.c.

References complete_ongoing_step_over(), find_lwp_pid(), find_process_pid(), for_each_thread(), linux_detach_lwp_callback(), linux_detach_one_lwp(), target_ops::mourn, pid_to_ptid(), stabilize_threads, stop_all_lwps(), the_target, thread_db_detach(), and unstop_all_lwps().

## ◆ linux_detach_lwp_callback()

static void linux_detach_lwp_callback | ( | thread_info * | thread | ) |
| static

Definition at line 1588 of file linux-low.c.

References get_thread_lwp, thread_info::id, linux_detach_one_lwp(), ptid_t::lwp(), and ptid_t::pid().

Referenced by linux_detach().

## ◆ linux_detach_one_lwp()

static void linux_detach_one_lwp | ( | struct lwp_info * | lwp | ) |
| static

Definition at line 1501 of file linux-low.c.

References _, __WALL, CATCH, check_ptrace_stopped_lwp_gone(), debug_printf(), debug_threads, delete_lwp(), END_CATCH, errno, error(), get_detach_signal(), get_lwp_thread, kill_lwp(), lwpid_of(), my_waitpid(), linux_target_ops::prepare_to_resume, ptid_of(), ptrace(), PTRACE_TYPE_ARG3, PTRACE_TYPE_ARG4, regcache_invalidate_thread(), RETURN_MASK_ERROR, lwp_info::stop_expected, strerror(), target_pid_to_str(), the_low_target, throw_exception(), TRY, warning(), WIFEXITED, and WIFSIGNALED.

Referenced by linux_detach(), and linux_detach_lwp_callback().

## ◆ linux_done_accessing_memory()

static void linux_done_accessing_memory | ( | void |  | ) |
| static

Definition at line 6632 of file linux-low.c.

References linux_unpause_all(), and non_stop.

## ◆ linux_emit_ops()

static struct emit_ops* linux_emit_ops | ( | void |  | ) |
| static

Definition at line 6663 of file linux-low.c.

References linux_target_ops::emit_ops, and the_low_target.

## ◆ linux_fast_tracepoint_collecting()

static fast_tpoint_collect_result linux_fast_tracepoint_collecting | ( | struct lwp_info * | lwp,
|  | struct fast_tpoint_collect_status * | status
| ) |  |
| static

Definition at line 2024 of file linux-low.c.

References fast_tracepoint_collecting(), get_lwp_thread, linux_target_ops::get_thread_area, lwpid_of(), not_collecting, 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().

## ◆ linux_fetch_registers()

static void linux_fetch_registers | ( | struct regcache * | regcache,
|  | int | regno
| ) |  |
| static

Definition at line 5673 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.

## ◆ linux_get_ipa_tdesc_idx()

static int linux_get_ipa_tdesc_idx | ( | void |  | ) |
| static

Definition at line 6564 of file linux-low.c.

References linux_target_ops::get_ipa_tdesc_idx, and the_low_target.

## ◆ linux_get_min_fast_tracepoint_insn_len()

static int linux_get_min_fast_tracepoint_insn_len | ( | void |  | ) |
| static

Definition at line 6672 of file linux-low.c.

References linux_target_ops::get_min_fast_tracepoint_insn_len, and the_low_target.

## ◆ linux_get_pc_32bit()

CORE_ADDR linux_get_pc_32bit | ( | struct regcache * | regcache | ) |

Definition at line 7411 of file linux-low.c.

References collect_register_by_name(), debug_printf(), and debug_threads.

Referenced by aarch64_get_pc().

## ◆ linux_get_pc_64bit()

CORE_ADDR linux_get_pc_64bit | ( | struct regcache * | regcache | ) |

Definition at line 7436 of file linux-low.c.

References collect_register_by_name(), debug_printf(), and debug_threads.

Referenced by aarch64_get_pc().

## ◆ linux_handle_new_gdb_connection()

static void linux_handle_new_gdb_connection | ( | void |  | ) |
| static

Definition at line 6326 of file linux-low.c.

References process_info::attached, find_process_pid(), for_each_thread(), get_thread_lwp, linux_enable_event_reporting(), linux_low_ptrace_options(), linux_stop_lwp(), lwpid_of(), lwp_info::must_set_ptrace_flags, pid_of(), lwp_info::stopped, and lwp_info::thread.

## ◆ linux_insert_point()

static int linux_insert_point | ( | enum raw_bkpt_type | type,
|  | CORE_ADDR | addr,
|  | int | size,
|  | struct raw_breakpoint * | bp
| ) |  |
| static

Definition at line 5970 of file linux-low.c.

References insert_memory_breakpoint(), linux_target_ops::insert_point, raw_bkpt_type_sw, and the_low_target.

## ◆ linux_install_fast_tracepoint_jump_pad()

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 6641 of file linux-low.c.

References linux_target_ops::install_fast_tracepoint_jump_pad, and the_low_target.

## ◆ linux_join()

static void linux_join | ( | int | pid | ) |
| static

Definition at line 1673 of file linux-low.c.

References errno, my_waitpid(), WIFEXITED, and WIFSIGNALED.

## ◆ linux_kill()

static int linux_kill | ( | int | pid | ) |
| static

Definition at line 1379 of file linux-low.c.

References debug_printf(), debug_threads, find_lwp_pid(), find_process_pid(), for_each_thread(), kill_one_lwp_callback(), kill_wait_lwp(), target_ops::mourn, pid_to_ptid(), stop_all_lwps(), the_target, lwp_info::thread, and unstop_all_lwps().

## ◆ linux_kill_one_lwp()

static void linux_kill_one_lwp | ( | struct lwp_info * | lwp | ) |
| static

Definition at line 1270 of file linux-low.c.

References debug_printf(), debug_threads, errno, get_lwp_thread, kill_lwp(), lwpid_of(), ptid_of(), ptrace(), PTRACE_TYPE_ARG3, PTRACE_TYPE_ARG4, strerror(), and target_pid_to_str().

Referenced by kill_wait_lwp().

## ◆ linux_look_up_symbols()

static void linux_look_up_symbols | ( | void |  | ) |
| static

Definition at line 5911 of file linux-low.c.

References current_process(), process_info::priv, process_info_private::thread_db, and thread_db_init().

## ◆ linux_low_filter_event()

static struct lwp_info* linux_low_filter_event | ( | int | lwpid,
|  | int | wstat
| ) |  |
| static

Definition at line 2348 of file linux-low.c.

References add_lwp(), add_to_pid_list(), process_info::attached, current_thread, debug_printf(), debug_threads, delete_lwp(), find_lwp_pid(), find_process_pid(), finish_step_over(), gdb_assert, get_lwp_thread, get_pc(), handle_extended_wait(), thread_info::last_resume_kind, lwp_info::last_status, last_thread_of_process_p(), linux_arch_setup_thread(), linux_enable_event_reporting(), linux_is_extended_waitstatus(), linux_low_ptrace_options(), linux_ptrace_get_extended_event(), linux_resume_one_lwp(), linux_wstatus_maybe_breakpoint(), mark_lwp_dead(), lwp_info::must_set_ptrace_flags, NOT_STOPPING_THREADS, pid_of(), pid_to_ptid(), ptid_build(), ptid_of(), PTRACE_EVENT_EXEC, report_thread_events, save_stop_reason(), lwp_info::status_pending, lwp_info::status_pending_p, lwp_info::stepping, lwp_info::stop_expected, lwp_info::stop_pc, lwp_info::stopped, stopped_pids, stopping_threads, SYSCALL_SIGTRAP, lwp_info::syscall_state, target_pid_to_str(), process_info::tdesc, lwp_info::thread, unsuspend_all_lwps(), WIFEXITED, WIFSIGNALED, WIFSTOPPED, and WSTOPSIG.

Referenced by linux_wait_for_event_filtered().

## ◆ linux_low_ptrace_options()

static int linux_low_ptrace_options | ( | int | attached | ) |
| static

Definition at line 2322 of file linux-low.c.

References PTRACE_O_EXITKILL, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEFORK, PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEVFORK, PTRACE_O_TRACEVFORKDONE, report_exec_events, report_fork_events, and report_vfork_events.

Referenced by linux_handle_new_gdb_connection(), linux_low_filter_event(), and linux_post_create_inferior().

## ◆ linux_mourn()

static void linux_mourn | ( | struct process_info * | process | ) |
| static

Definition at line 1647 of file linux-low.c.

References process_info_private::arch_private, linux_target_ops::delete_process, for_each_thread(), free(), gdb_assert, process_info::pid, process_info::priv, remove_process(), the_low_target, and thread_db_mourn().

Referenced by handle_extended_wait().

## ◆ linux_pause_all()

static void linux_pause_all | ( | int | freeze | ) |
| static

Definition at line 6607 of file linux-low.c.

References stop_all_lwps().

Referenced by linux_prepare_to_access_memory().

## ◆ linux_pid_exe_is_elf_64_file()

int linux_pid_exe_is_elf_64_file | ( | int | pid,
|  | unsigned int * | machine
| ) |  |

Definition at line 400 of file linux-low.c.

References elf_64_file_p().

Referenced by aarch64_arch_setup(), tile_arch_setup(), x86_linux_read_description(), and x86_siginfo_fixup().

## ◆ linux_post_create_inferior()

static void linux_post_create_inferior | ( | void |  | ) |
| static

Definition at line 1027 of file linux-low.c.

References process_info::attached, current_process(), current_thread, get_thread_lwp, linux_arch_setup(), linux_enable_event_reporting(), linux_low_ptrace_options(), lwpid_of(), and lwp_info::must_set_ptrace_flags.

## ◆ linux_prepare_to_access_memory()

static int linux_prepare_to_access_memory | ( | void |  | ) |
| static

Definition at line 6622 of file linux-low.c.

References linux_pause_all(), and non_stop.

## ◆ linux_process_qsupported()

static void linux_process_qsupported | ( | char ** | features,
|  | int | count
| ) |  |
| static

Definition at line 6550 of file linux-low.c.

References linux_target_ops::process_qsupported, and the_low_target.

## ◆ linux_ptrace_fun()

static void linux_ptrace_fun | ( |  | ) |
| static

Definition at line 962 of file linux-low.c.

References ptrace(), PTRACE_TYPE_ARG3, PTRACE_TYPE_ARG4, remote_connection_is_stdio(), and trace_start_error_with_name().

Referenced by linux_create_inferior().

## ◆ linux_qxfer_libraries_svr4()

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 6977 of file linux-low.c.

References current_process(), current_thread, decode_address_to_semicolon(), elf_64_file_p(), get_r_debug(), 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(), name, offset, process_info::priv, process_info_private::r_debug, link_map_offsets::r_map_offset, link_map_offsets::r_version_offset, read_one_ptr(), startswith(), string, warning(), xfree(), xmalloc(), xml_escape_text(), xrealloc(), and xsnprintf().

## ◆ linux_qxfer_osdata()

static int linux_qxfer_osdata | ( | const char * | annex,
|  | unsigned char * | readbuf,
|  | unsigned const char * | writebuf,
|  | CORE_ADDR | offset,
|  | int | len
| ) |  |
| static

Definition at line 6113 of file linux-low.c.

References linux_common_xfer_osdata(), and offset.

## ◆ linux_qxfer_spu()

static int linux_qxfer_spu | ( | const char * | annex,
|  | unsigned char * | readbuf,
|  | unsigned const char * | writebuf,
|  | CORE_ADDR | offset,
|  | int | len
| ) |  |
| static

Definition at line 6430 of file linux-low.c.

References current_thread, lwpid_of(), offset, and spu_enumerate_spu_ids().

## ◆ linux_read_auxv()

static int linux_read_auxv | ( | CORE_ADDR | offset,
|  | unsigned char * | myaddr,
|  | unsigned int | len
| ) |  |
| static

Definition at line 5935 of file linux-low.c.

References current_thread, lwpid_of(), offset, process_info::pid, and xsnprintf().

## ◆ linux_read_memory()

static int linux_read_memory | ( | CORE_ADDR | memaddr,
|  | unsigned char * | myaddr,
|  | int | len
| ) |  |
| static

Definition at line 5735 of file linux-low.c.

References current_thread, errno, lwpid_of(), O_LARGEFILE, ptrace(), PTRACE_TYPE_ARG3, PTRACE_TYPE_ARG4, and PTRACE_XFER_TYPE.

Referenced by get_dynamic(), get_r_debug(), linux_qxfer_libraries_svr4(), and read_one_ptr().

## ◆ linux_read_pc()

static CORE_ADDR linux_read_pc | ( | struct regcache * | regcache | ) |
| static

Definition at line 6582 of file linux-low.c.

References linux_target_ops::get_pc, and the_low_target.

## ◆ linux_register_in_regsets()

static int linux_register_in_regsets | ( | const struct regs_info * | regs_info,
|  | int | regno
| ) |  |
| static

Definition at line 5498 of file linux-low.c.

References regs_info::regset_bitmap, and use_linux_regsets.

Referenced by linux_fetch_registers(), and linux_store_registers().

## ◆ linux_remove_point()

static int linux_remove_point | ( | enum raw_bkpt_type | type,
|  | CORE_ADDR | addr,
|  | int | size,
|  | struct raw_breakpoint * | bp
| ) |  |
| static

Definition at line 5983 of file linux-low.c.

References raw_bkpt_type_sw, remove_memory_breakpoint(), linux_target_ops::remove_point, and the_low_target.

## ◆ linux_request_interrupt()

static void linux_request_interrupt | ( | void |  | ) |
| static

Definition at line 5924 of file linux-low.c.

References signal_pid.

## ◆ linux_resume()

static void linux_resume | ( | struct thread_resume * | resume_info,
|  | size_t | n
| ) |  |
| static

Definition at line 5031 of file linux-low.c.

References async_file_mark(), debug_enter, debug_exit, debug_printf(), debug_threads, find_thread(), for_each_thread(), get_thread_lwp, linux_resume_one_thread(), linux_set_resume_request(), need_step_over_p(), non_stop, resume_status_pending_p(), start_step_over(), supports_breakpoints(), and target_is_async_p.

## ◆ linux_resume_one_lwp()

static void linux_resume_one_lwp | ( | struct lwp_info * | lwp,
|  | int | step,
|  | int | signal,
|  | siginfo_t * | info
| ) |  |
| static

Definition at line 4501 of file linux-low.c.

References CATCH, check_ptrace_stopped_lwp_gone(), END_CATCH, linux_resume_one_lwp_throw(), RETURN_MASK_ERROR, throw_exception(), and TRY.

Referenced by linux_low_filter_event(), linux_wait_1(), linux_wait_for_event_filtered(), move_out_of_jump_pad_callback(), proceed_one_lwp(), resume_stopped_resumed_lwps(), start_step_over(), and status_pending_p_callback().

## ◆ linux_resume_one_lwp_throw()

static void linux_resume_one_lwp_throw | ( | struct lwp_info * | lwp,
|  | int | step,
|  | int | signal,
|  | siginfo_t * | info
| ) |  |
| static

Definition at line 4259 of file linux-low.c.

References at_insn, before_insn, lwp_info::bp_reinsert, can_hardware_single_step(), lwp_info::collecting_fast_tracepoint, current_thread, debug_printf(), debug_threads, enqueue_pending_signal(), errno, free(), gdb_assert, gdb_catching_syscalls_p(), get_lwp_thread, linux_target_ops::get_pc, get_pc(), get_thread_process(), get_thread_regcache(), internal_error(), lwp_signal_can_be_delivered(), lwpid_of(), maybe_hw_step(), not_collecting, paddress(), lwp_info::pending_signals, perror_with_name(), linux_target_ops::prepare_to_resume, pending_signals::prev, ptrace(), PTRACE_SETSIGINFO, PTRACE_TYPE_ARG3, PTRACE_TYPE_ARG4, regcache_invalidate_thread(), release_while_stepping_state_list(), pending_signals::signal, single_step(), stabilizing_threads, lwp_info::status_pending_p, lwp_info::stepping, lwp_info::stop_expected, lwp_info::stop_pc, lwp_info::stop_reason, lwp_info::stopped, lwp_info::suspended, process_info::tdesc, the_low_target, lwp_info::waitstatus, warning(), and thread_info::while_stepping.

Referenced by linux_resume_one_lwp().

## ◆ linux_resume_one_thread()

static void linux_resume_one_thread | ( | thread_info * | thread,
|  | bool | leave_all_stopped
| ) |  |
| static

Definition at line 4927 of file linux-low.c.

References debug_printf(), debug_threads, enqueue_pending_signal(), get_thread_lwp, thread_resume::kind, thread_info::last_status, lwp_info::last_status, lwpid_of(), lwp_info::pending_signals_to_report, proceed_one_lwp(), ptrace(), PTRACE_GETSIGINFO, PTRACE_TYPE_ARG3, lwp_info::resume, send_sigstop(), thread_resume::sig, lwp_info::status_pending_p, lwp_info::stopped, lwp_info::suspended, lwp_info::thread, WIFSTOPPED, and WSTOPSIG.

Referenced by linux_resume().

## ◆ linux_set_pc_32bit()

void linux_set_pc_32bit | ( | struct regcache * | regcache,
|  | CORE_ADDR | pc
| ) |  |

Definition at line 7400 of file linux-low.c.

References supply_register_by_name().

Referenced by aarch64_set_pc().

## ◆ linux_set_pc_64bit()

void linux_set_pc_64bit | ( | struct regcache * | regcache,
|  | CORE_ADDR | pc
| ) |  |

Definition at line 7425 of file linux-low.c.

References supply_register_by_name().

Referenced by aarch64_set_pc().

## ◆ linux_set_resume_request()

static void linux_set_resume_request | ( | thread_info * | thread,
|  | thread_resume * | resume,
|  | size_t | n
| ) |  |
| static

Definition at line 4525 of file linux-low.c.

References debug_printf(), debug_threads, dequeue_one_deferred_signal(), lwp_info::fork_relative, get_thread_lwp, thread_info::id, in_queued_stop_replies(), thread_resume::kind, thread_info::last_resume_kind, thread_info::last_status, lwpid_of(), minus_one_ptid, pid_of(), ptid_equal(), ptid_get_lwp(), ptid_get_pid(), ptid_is_pid(), lwp_info::resume, 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, lwp_info::thread, lwp_info::waitstatus, and WSTOPSIG.

Referenced by linux_resume().

## ◆ linux_stabilize_threads()

static void linux_stabilize_threads | ( | void |  | ) |
| static

Definition at line 2958 of file linux-low.c.

References current_thread, debug_printf(), debug_threads, enqueue_one_deferred_signal(), find_thread(), for_each_thread(), gdb_signal_to_host(), get_thread_lwp, thread_info::last_resume_kind, linux_wait_1(), lwp_running(), lwp_suspended_inc(), lwpid_of(), minus_one_ptid, move_out_of_jump_pad_callback(), stabilizing_threads, stuck_in_jump_pad_callback(), unsuspend_all_lwps(), and W_STOPCODE.

## ◆ linux_start_non_stop()

static int linux_start_non_stop | ( | int | nonstop | ) |
| static

Definition at line 6280 of file linux-low.c.

References linux_async(), and target_is_async_p.

## ◆ linux_stop_lwp()

void linux_stop_lwp | ( | struct lwp_info * | lwp | ) |

Definition at line 3907 of file linux-low.c.

References send_sigstop().

Referenced by debug_reg_change_callback(), linux_handle_new_gdb_connection(), update_debug_registers_callback(), update_registers_callback(), and update_watch_registers_callback().

## ◆ linux_stopped_by_hw_breakpoint()

static int linux_stopped_by_hw_breakpoint | ( | void |  | ) |
| static

Definition at line 6019 of file linux-low.c.

References current_thread, get_thread_lwp, and lwp_info::stop_reason.

## ◆ linux_stopped_by_sw_breakpoint()

static int linux_stopped_by_sw_breakpoint | ( | void |  | ) |
| static

Definition at line 5999 of file linux-low.c.

References current_thread, get_thread_lwp, and lwp_info::stop_reason.

## ◆ linux_stopped_by_watchpoint()

static int linux_stopped_by_watchpoint | ( | void |  | ) |
| static

Definition at line 6050 of file linux-low.c.

References current_thread, get_thread_lwp, and lwp_info::stop_reason.

## ◆ linux_stopped_data_address()

static CORE_ADDR linux_stopped_data_address | ( | void |  | ) |
| static

Definition at line 6058 of file linux-low.c.

References current_thread, get_thread_lwp, and lwp_info::stopped_data_address.

## ◆ linux_store_registers()

static void linux_store_registers | ( | struct regcache * | regcache,
|  | int | regno
| ) |  |
| static

Definition at line 5706 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.

## ◆ linux_supports_agent()

static int linux_supports_agent | ( | void |  | ) |
| static

Definition at line 6362 of file linux-low.c.

## ◆ linux_supports_catch_syscall()

static int linux_supports_catch_syscall | ( | void |  | ) |
| static

Definition at line 6557 of file linux-low.c.

References linux_target_ops::get_syscall_trapinfo, linux_supports_tracesysgood(), and the_low_target.

## ◆ linux_supports_disable_randomization()

static int linux_supports_disable_randomization | ( | void |  | ) |
| static

Definition at line 6352 of file linux-low.c.

## ◆ linux_supports_exec_events()

static int linux_supports_exec_events | ( | void |  | ) |
| static

Definition at line 6316 of file linux-low.c.

References linux_supports_traceexec().

## ◆ linux_supports_fork_events()

static int linux_supports_fork_events | ( | void |  | ) |
| static

Definition at line 6300 of file linux-low.c.

References linux_supports_tracefork().

## ◆ linux_supports_hardware_single_step()

static int linux_supports_hardware_single_step | ( | void |  | ) |
| static

Definition at line 6038 of file linux-low.c.

References can_hardware_single_step().

## ◆ linux_supports_multi_process()

static int linux_supports_multi_process | ( | void |  | ) |
| static

Definition at line 6292 of file linux-low.c.

## ◆ linux_supports_non_stop()

static int linux_supports_non_stop | ( | void |  | ) |
| static

Definition at line 6219 of file linux-low.c.

## ◆ linux_supports_range_stepping()

static int linux_supports_range_stepping | ( | void |  | ) |
| static

Definition at line 6368 of file linux-low.c.

References can_software_single_step(), linux_target_ops::supports_range_stepping, and the_low_target.

## ◆ linux_supports_software_single_step()

static int linux_supports_software_single_step | ( | void |  | ) |
| static

Definition at line 6044 of file linux-low.c.

References can_software_single_step().

## ◆ linux_supports_stopped_by_hw_breakpoint()

static int linux_supports_stopped_by_hw_breakpoint | ( | void |  | ) |
| static

Definition at line 6030 of file linux-low.c.

References USE_SIGTRAP_SIGINFO.

## ◆ linux_supports_stopped_by_sw_breakpoint()

static int linux_supports_stopped_by_sw_breakpoint | ( | void |  | ) |
| static

Definition at line 6010 of file linux-low.c.

References USE_SIGTRAP_SIGINFO.

## ◆ linux_supports_tracepoints()

static int linux_supports_tracepoints | ( | void |  | ) |
| static

Definition at line 6573 of file linux-low.c.

References linux_target_ops::supports_tracepoints, and the_low_target.

## ◆ linux_supports_vfork_events()

static int linux_supports_vfork_events | ( | void |  | ) |
| static

Definition at line 6308 of file linux-low.c.

References linux_supports_tracefork().

## ◆ linux_supports_z_point_type()

static int linux_supports_z_point_type | ( | char | z_type | ) |
| static

Definition at line 5963 of file linux-low.c.

References linux_target_ops::supports_z_point_type, and the_low_target.

## ◆ linux_sw_breakpoint_from_kind()

static const gdb_byte* linux_sw_breakpoint_from_kind | ( | int | kind,
|  | int * | size
| ) |  |
| static

Definition at line 7377 of file linux-low.c.

References gdb_assert, linux_target_ops::sw_breakpoint_from_kind, and the_low_target.

## ◆ linux_thread_alive()

static int linux_thread_alive | ( | ptid_t | ptid | ) |
| static

Definition at line 1686 of file linux-low.c.

References find_lwp_pid(), and lwp_is_marked_dead().

Referenced by wait_for_sigstop().

## ◆ linux_thread_stopped()

static int linux_thread_stopped | ( | struct thread_info * | thread | ) |
| static

Definition at line 6599 of file linux-low.c.

References get_thread_lwp.

## ◆ linux_unpause_all()

static void linux_unpause_all | ( | int | unfreeze | ) |
| static

Definition at line 6616 of file linux-low.c.

References unstop_all_lwps().

Referenced by linux_done_accessing_memory().

## ◆ linux_wait()

static ptid_t linux_wait | ( | ptid_t | ptid,
|  | struct target_waitstatus * | ourstatus,
|  | int | target_options
| ) |  |
| static

Definition at line 3861 of file linux-low.c.

References async_file_flush(), async_file_mark(), linux_wait_1(), null_ptid, ptid_equal(), and target_is_async_p.

## ◆ linux_wait_1()

static ptid_t linux_wait_1 | ( | ptid_t | ptid,
|  | struct target_waitstatus * | ourstatus,
|  | int | target_options
| ) |  |
| static

Definition at line 3099 of file linux-low.c.

References __SIGRTMIN, __WALL, agent_loaded_p(), before_insn, linux_target_ops::breakpoint_at, breakpoint_inserted_here(), target_ops::breakpoint_kind_from_current_state, can_software_single_step(), check_breakpoints(), lwp_info::collecting_fast_tracepoint, current_process(), current_thread, debug_enter, debug_exit, debug_printf(), debug_threads, linux_target_ops::decr_pc_after_break, delete_breakpoint(), delete_single_step_breakpoints(), dequeue_one_deferred_signal(), enqueue_one_deferred_signal(), enqueue_pending_signal(), lwp_info::exit_jump_pad_bkpt, filter_exit_event(), find_thread(), finish_step_over(), for_each_thread(), lwp_info::fork_relative, gdb_assert, gdb_breakpoint_here(), gdb_catch_this_syscall_p(), gdb_condition_true_at_breakpoint(), gdb_no_commands_at_breakpoint(), gdb_signal_from_host(), get_lwp_thread, get_syscall_trapinfo(), get_thread_lwp, get_thread_regcache(), handle_tracepoints(), has_single_step_breakpoints(), ignore_event(), thread_info::last_resume_kind, linux_fast_tracepoint_collecting(), linux_resume_one_lwp(), linux_wait_for_event(), linux_wstatus_maybe_breakpoint(), lwp_in_step_range(), lwpid_of(), maybe_move_out_of_jump_pad(), minus_one_ptid, non_stop, not_collecting, not_stopped_callback(), null_ptid, paddress(), pass_signals, proceed_all_lwps(), ptid_equal(), ptid_of(), ptrace(), PTRACE_GETSIGINFO, PTRACE_TYPE_ARG3, run_breakpoint_commands(), select_event_lwp(), linux_target_ops::set_pc, single_step_breakpoint_inserted_here(), stabilize_threads, stabilizing_threads, lwp_info::status_pending, lwp_info::status_pending_p, status_pending_p_callback(), step_over_bkpt, lwp_info::step_range_end, lwp_info::step_range_start, lwp_info::stepping, stop_all_lwps(), lwp_info::stop_pc, lwp_info::stop_reason, string, supports_breakpoints(), supports_fast_tracepoints(), lwp_info::suspended, target_ops::sw_breakpoint_from_kind, swbreak_feature, SYSCALL_SIGTRAP, lwp_info::syscall_state, target_pid_to_str(), the_low_target, the_target, lwp_info::thread, unstop_all_lwps(), unsuspend_all_lwps(), USE_THREAD_DB, lwp_info::waitstatus, WEXITSTATUS, WIFEXITED, WIFSIGNALED, WIFSTOPPED, WNOHANG, WSTOPSIG, and WTERMSIG.

Referenced by linux_stabilize_threads(), and linux_wait().

## ◆ linux_wait_for_event()

static int linux_wait_for_event | ( | ptid_t | ptid,
|  | int * | wstat,
|  | int | options
| ) |  |
| static

Definition at line 2816 of file linux-low.c.

References linux_wait_for_event_filtered().

Referenced by linux_wait_1().

## ◆ linux_wait_for_event_filtered()

static int linux_wait_for_event_filtered | ( | ptid_t | wait_ptid,
|  | ptid_t | filter_ptid,
|  | int * | wstat,
|  | int | options
| ) |  |
| static

Definition at line 2610 of file linux-low.c.

References check_zombie_leaders(), lwp_info::collecting_fast_tracepoint, current_thread, debug_printf(), debug_threads, enqueue_one_deferred_signal(), errno, find_lwp_pid(), find_thread(), find_thread_in_random(), for_each_thread(), get_lwp_thread, get_thread_lwp, internal_error(), linux_low_filter_event(), linux_resume_one_lwp(), lwpid_of(), minus_one_ptid, my_waitpid(), not_collecting, not_stopped_callback(), NOT_STOPPING_THREADS, null_ptid, ptid_equal(), ptid_is_pid(), resume_stopped_resumed_lwps(), lwp_info::status_pending, lwp_info::status_pending_p, status_pending_p_callback(), status_to_str(), stopping_threads, strerror(), lwp_info::suspended, lwp_info::thread, and WNOHANG.

Referenced by complete_ongoing_step_over(), linux_attach(), linux_wait_for_event(), and wait_for_sigstop().

## ◆ linux_write_memory()

static int linux_write_memory | ( | CORE_ADDR | memaddr,
|  | const unsigned char * | myaddr,
|  | int | len
| ) |  |
| static

Definition at line 5824 of file linux-low.c.

References current_thread, debug_printf(), debug_threads, errno, lwpid_of(), ptrace(), PTRACE_TYPE_ARG3, PTRACE_TYPE_ARG4, and PTRACE_XFER_TYPE.

## ◆ linux_write_pc()

static void linux_write_pc | ( | struct regcache * | regcache,
|  | CORE_ADDR | pc
| ) |  |
| static

Definition at line 6591 of file linux-low.c.

References gdb_assert, linux_target_ops::set_pc, and the_low_target.

## ◆ linux_xfer_siginfo()

static int linux_xfer_siginfo | ( | const char * | annex,
|  | unsigned char * | readbuf,
|  | unsigned const char * | writebuf,
|  | CORE_ADDR | offset,
|  | int | len
| ) |  |
| static

Definition at line 6143 of file linux-low.c.

References current_thread, debug_printf(), debug_threads, lwpid_of(), offset, ptrace(), PTRACE_GETSIGINFO, PTRACE_SETSIGINFO, PTRACE_TYPE_ARG3, and siginfo_fixup().

## ◆ lwp_arch_private_info()

struct arch_lwp_info* lwp_arch_private_info | ( | struct lwp_info * | lwp | ) |

Definition at line 161 of file linux-low.c.

References lwp_info::arch_private.

Referenced by aarch64_linux_prepare_to_resume(), debug_reg_change_callback(), lwp_debug_registers_changed(), and lwp_set_debug_registers_changed().

## ◆ lwp_in_step_range()

static int lwp_in_step_range | ( | struct lwp_info * | lwp | ) |
| static

Definition at line 330 of file linux-low.c.

References lwp_info::step_range_end, lwp_info::step_range_start, and lwp_info::stop_pc.

Referenced by linux_wait_1().

## ◆ lwp_is_marked_dead()

static int lwp_is_marked_dead | ( | struct lwp_info * | lwp | ) |
| static

Definition at line 3998 of file linux-low.c.

References lwp_info::status_pending, lwp_info::status_pending_p, WIFEXITED, and WIFSIGNALED.

Referenced by linux_thread_alive(), and lwp_running().

## ◆ lwp_is_stepping()

int lwp_is_stepping | ( | struct lwp_info * | lwp | ) |

Definition at line 185 of file linux-low.c.

References lwp_info::stepping.

## ◆ lwp_is_stopped()

int lwp_is_stopped | ( | struct lwp_info * | lwp | ) |

Definition at line 169 of file linux-low.c.

References lwp_info::stopped.

Referenced by debug_reg_change_callback(), update_debug_registers_callback(), and x86_linux_update_debug_registers().

## ◆ lwp_resumed()

static int lwp_resumed | ( | struct lwp_info * | lwp | ) |
| static

Definition at line 1770 of file linux-low.c.

References get_lwp_thread, thread_info::last_resume_kind, and thread_info::last_status.

Referenced by status_pending_p_callback().

## ◆ lwp_running()

static bool lwp_running | ( | thread_info * | thread | ) |
| static

Definition at line 4124 of file linux-low.c.

References get_thread_lwp, lwp_is_marked_dead(), lwp_info::stopped, and lwp_info::thread.

Referenced by linux_stabilize_threads().

## ◆ lwp_set_arch_private_info()

void lwp_set_arch_private_info | ( | struct lwp_info * | lwp,
|  | struct arch_lwp_info * | info
| ) |  |

Definition at line 152 of file linux-low.c.

References lwp_info::arch_private.

Referenced by aarch64_linux_new_thread(), debug_reg_change_callback(), and lwp_set_debug_registers_changed().

## ◆ lwp_signal_can_be_delivered()

static int lwp_signal_can_be_delivered | ( | struct lwp_info * | lwp | ) |
| static

Definition at line 4249 of file linux-low.c.

References lwp_info::collecting_fast_tracepoint, and not_collecting.

Referenced by linux_resume_one_lwp_throw(), and need_step_over_p().

## ◆ lwp_stop_reason()

enum target_stop_reason lwp_stop_reason | ( | struct lwp_info * | lwp | ) |

Definition at line 177 of file linux-low.c.

References lwp_info::stop_reason.

Referenced by x86_linux_update_debug_registers().

## ◆ lwp_suspended_decr()

static void lwp_suspended_decr | ( | struct lwp_info * | lwp | ) |
| static

Definition at line 1956 of file linux-low.c.

References get_lwp_thread, internal_error(), lwpid_of(), and lwp_info::suspended.

Referenced by handle_tracepoints(), unsuspend_all_lwps(), and unsuspend_and_proceed_one_lwp().

## ◆ lwp_suspended_inc()

static void lwp_suspended_inc | ( | struct lwp_info * | lwp | ) |
| static

Definition at line 1940 of file linux-low.c.

References debug_printf(), debug_threads, get_lwp_thread, lwpid_of(), and lwp_info::suspended.

Referenced by handle_tracepoints(), linux_stabilize_threads(), move_out_of_jump_pad_callback(), and suspend_and_send_sigstop().

## ◆ mark_lwp_dead()

static void mark_lwp_dead | ( | struct lwp_info * | lwp,
|  | int | wstat
| ) |  |
| static

Definition at line 3968 of file linux-low.c.

References gdb_signal_from_host(), lwp_info::status_pending, lwp_info::status_pending_p, lwp_info::stop_expected, lwp_info::stopped, lwp_info::waitstatus, WEXITSTATUS, WIFEXITED, WIFSIGNALED, and WTERMSIG.

Referenced by linux_low_filter_event().

## ◆ maybe_hw_step()

static int maybe_hw_step | ( | struct thread_info * | thread | ) |
| static

Definition at line 2559 of file linux-low.c.

References can_hardware_single_step(), gdb_assert, and has_single_step_breakpoints().

Referenced by linux_resume_one_lwp_throw(), proceed_one_lwp(), and resume_stopped_resumed_lwps().

## ◆ maybe_move_out_of_jump_pad()

static int maybe_move_out_of_jump_pad | ( | struct lwp_info * | lwp,
|  | int * | wstat
| ) |  |
| static

Definition at line 2049 of file linux-low.c.

References fast_tpoint_collect_status::adjusted_insn_addr, fast_tpoint_collect_status::adjusted_insn_addr_end, agent_loaded_p(), before_insn, lwp_info::collecting_fast_tracepoint, current_thread, debug_printf(), 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(), not_collecting, ptrace(), PTRACE_GETSIGINFO, PTRACE_SETSIGINFO, 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, unstop_all_lwps(), WIFSTOPPED, and WSTOPSIG.

Referenced by linux_wait_1(), and move_out_of_jump_pad_callback().

## ◆ move_out_of_jump_pad_callback()

static void move_out_of_jump_pad_callback | ( | thread_info * | thread | ) |
| static

Definition at line 4074 of file linux-low.c.

References current_thread, debug_printf(), debug_threads, enqueue_one_deferred_signal(), gdb_assert, gdb_breakpoint_here(), get_thread_lwp, internal_error(), thread_info::last_resume_kind, linux_resume_one_lwp(), lwp_suspended_inc(), lwpid_of(), maybe_move_out_of_jump_pad(), lwp_info::status_pending, lwp_info::status_pending_p, lwp_info::stop_pc, lwp_info::stop_reason, lwp_info::stopped, lwp_info::suspended, lwp_info::thread, and WSTOPSIG.

Referenced by linux_stabilize_threads().

## ◆ need_step_over_p()

static bool need_step_over_p | ( | thread_info * | thread | ) |
| static

Definition at line 4650 of file linux-low.c.

References breakpoint_here(), can_software_single_step(), current_thread, debug_printf(), debug_threads, fast_tracepoint_jump_here(), gdb_assert, gdb_breakpoint_here(), gdb_condition_true_at_breakpoint(), gdb_no_commands_at_breakpoint(), get_pc(), get_thread_lwp, get_thread_process(), thread_info::last_resume_kind, lwp_signal_can_be_delivered(), lwpid_of(), paddress(), lwp_info::pending_signals, lwp_info::status_pending_p, lwp_info::stop_pc, lwp_info::stopped, lwp_info::suspended, process_info::tdesc, and lwp_info::thread.

Referenced by linux_resume(), and proceed_all_lwps().

## ◆ not_stopped_callback()

static bool not_stopped_callback | ( | thread_info * | thread,
|  | ptid_t | filter
| ) |  |
| static

Definition at line 1927 of file linux-low.c.

References get_thread_lwp, thread_info::id, ptid_t::matches(), lwp_info::stopped, and lwp_info::thread.

Referenced by linux_wait_1(), and linux_wait_for_event_filtered().

## ◆ num_lwps()

static int num_lwps | ( | int | pid | ) |
| static

Definition at line 1829 of file linux-low.c.

References for_each_thread(), and lwp_info::thread.

Referenced by check_zombie_leaders().

## ◆ proceed_all_lwps()

static void proceed_all_lwps | ( | void |  | ) |
| static

Definition at line 5224 of file linux-low.c.

References debug_printf(), debug_threads, find_thread(), for_each_thread(), get_thread_lwp, lwpid_of(), need_step_over_p(), proceed_one_lwp(), start_step_over(), and supports_breakpoints().

Referenced by linux_wait_1().

## ◆ proceed_one_lwp()

static void proceed_one_lwp | ( | thread_info * | thread,
|  | lwp_info * | except
| ) |  |
| static

Definition at line 5110 of file linux-low.c.

References lwp_info::bp_reinsert, can_software_single_step(), lwp_info::collecting_fast_tracepoint, debug_printf(), debug_threads, gdb_assert, get_thread_lwp, has_single_step_breakpoints(), install_software_single_step_breakpoints(), thread_info::last_resume_kind, thread_info::last_status, linux_resume_one_lwp(), lwpid_of(), maybe_hw_step(), not_collecting, lwp_info::pending_signals_to_report, send_sigstop(), lwp_info::status_pending_p, lwp_info::stopped, lwp_info::suspended, and lwp_info::thread.

Referenced by linux_resume_one_thread(), proceed_all_lwps(), unstop_all_lwps(), and unsuspend_and_proceed_one_lwp().

## ◆ ptid_of_lwp()

ptid_t ptid_of_lwp | ( | struct lwp_info * | lwp | ) |

Definition at line 144 of file linux-low.c.

References get_lwp_thread, and ptid_of().

Referenced by aarch64_linux_prepare_to_resume(), debug_reg_change_callback(), and x86_linux_update_debug_registers().

## ◆ pull_pid_from_list()

static int pull_pid_from_list | ( | struct simple_pid_list ** | listp,
|  | int | pid,
|  | int * | statusp
| ) |  |
| static

Definition at line 222 of file linux-low.c.

References simple_pid_list::next, simple_pid_list::pid, simple_pid_list::status, and xfree().

Referenced by handle_extended_wait().

## ◆ read_one_ptr()

static int read_one_ptr | ( | CORE_ADDR | memaddr,
|  | CORE_ADDR * | ptr,
|  | int | ptr_size
| ) |  |
| static

Definition at line 6922 of file linux-low.c.

References gdb_assert_not_reached, and linux_read_memory().

Referenced by linux_qxfer_libraries_svr4().

## ◆ resume_status_pending_p()

static bool resume_status_pending_p | ( | thread_info * | thread | ) |
| static

Definition at line 4632 of file linux-low.c.

References get_thread_lwp, lwp_info::resume, lwp_info::thread, and thread_still_has_status_pending_p().

Referenced by linux_resume().

## ◆ resume_stopped_resumed_lwps()

static void resume_stopped_resumed_lwps | ( | thread_info * | thread | ) |
| static

Definition at line 2576 of file linux-low.c.

References debug_printf(), debug_threads, get_thread_lwp, thread_info::last_resume_kind, thread_info::last_status, linux_resume_one_lwp(), maybe_hw_step(), paddress(), ptid_of(), lwp_info::status_pending_p, lwp_info::stop_pc, lwp_info::stopped, lwp_info::suspended, target_pid_to_str(), and lwp_info::thread.

Referenced by linux_wait_for_event_filtered().

## ◆ save_stop_reason()

static int save_stop_reason | ( | struct lwp_info * | lwp | ) |
| static

Definition at line 807 of file linux-low.c.

References linux_target_ops::breakpoint_at, check_stopped_by_watchpoint(), current_thread, debug_printf(), debug_threads, linux_target_ops::decr_pc_after_break, GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT, get_lwp_thread, linux_target_ops::get_pc, get_pc(), get_thread_regcache(), hardware_breakpoint_inserted_here(), lwpid_of(), ptid_of(), ptrace(), PTRACE_GETSIGINFO, PTRACE_TYPE_ARG3, linux_target_ops::set_pc, lwp_info::stepping, lwp_info::stop_pc, lwp_info::stop_reason, target_pid_to_str(), and the_low_target.

Referenced by linux_low_filter_event().

## ◆ select_event_lwp()

static void select_event_lwp | ( | struct lwp_info ** | orig_lp | ) |
| static

Definition at line 2824 of file linux-low.c.

References debug_printf(), debug_threads, find_thread(), for_each_thread(), gdb_assert, get_thread_lwp, thread_info::last_resume_kind, thread_info::last_status, non_stop, ptid_of(), lwp_info::status_pending_p, and target_pid_to_str().

Referenced by linux_wait_1().

## ◆ send_sigstop() [1/2]

static void send_sigstop | ( | struct lwp_info * | lwp | ) |
| static

Definition at line 3913 of file linux-low.c.

References debug_printf(), debug_threads, get_lwp_thread, kill_lwp(), lwpid_of(), and lwp_info::stop_expected.

Referenced by linux_resume_one_thread(), linux_stop_lwp(), proceed_one_lwp(), send_sigstop(), stop_all_lwps(), and suspend_and_send_sigstop().

## ◆ send_sigstop() [2/2]

static void send_sigstop | ( | thread_info * | thread,
|  | lwp_info * | except
| ) |  |
| static

Definition at line 3937 of file linux-low.c.

References get_thread_lwp, send_sigstop(), lwp_info::stopped, and lwp_info::thread.

## ◆ sigchld_handler()

static void sigchld_handler | ( | int | signo | ) |
| static

Definition at line 6196 of file linux-low.c.

References async_file_mark(), debug_threads, errno, and target_is_async_p.

Referenced by initialize_low().

## ◆ siginfo_fixup()

static void siginfo_fixup | ( | siginfo_t * | siginfo,
|  | gdb_byte * | inf_siginfo,
|  | int | direction
| ) |  |
| static

Definition at line 6124 of file linux-low.c.

References linux_target_ops::siginfo_fixup, and the_low_target.

Referenced by linux_xfer_siginfo().

## ◆ single_step()

static int single_step | ( | struct lwp_info * | lwp | ) |
| static

Definition at line 4220 of file linux-low.c.

References can_hardware_single_step(), can_software_single_step(), debug_printf(), debug_threads, and install_software_single_step_breakpoints().

Referenced by linux_resume_one_lwp_throw(), and start_step_over().

## ◆ spu_enumerate_spu_ids()

static int spu_enumerate_spu_ids | ( | long | pid,
|  | unsigned char * | buf,
|  | CORE_ADDR | offset,
|  | int | len
| ) |  |
| static

Definition at line 6380 of file linux-low.c.

References offset, S_ISDIR, and SPUFS_MAGIC.

Referenced by linux_qxfer_spu().

## ◆ start_step_over()

static int start_step_over | ( | struct lwp_info * | lwp | ) |
| static

Definition at line 4791 of file linux-low.c.

References lwp_info::bp_reinsert, current_thread, debug_printf(), debug_threads, get_lwp_thread, get_pc(), thread_info::id, internal_error(), linux_resume_one_lwp(), lwpid_of(), single_step(), step_over_bkpt, stop_all_lwps(), lwp_info::suspended, uninsert_breakpoints_at(), and uninsert_fast_tracepoint_jumps_at().

Referenced by linux_resume(), and proceed_all_lwps().

## ◆ status_pending_p_callback()

static bool status_pending_p_callback | ( | thread_info * | thread,
|  | ptid_t | ptid
| ) |  |
| static

Definition at line 1789 of file linux-low.c.

References get_thread_lwp, thread_info::id, linux_resume_one_lwp(), lwp_resumed(), ptid_t::matches(), lwp_info::status_pending_p, lwp_info::stepping, lwp_info::thread, and thread_still_has_status_pending_p().

Referenced by linux_wait_1(), and linux_wait_for_event_filtered().

## ◆ stop_all_lwps()

static void stop_all_lwps | ( | int | suspend,
|  | struct lwp_info * | except
| ) |  |
| static

Definition at line 4139 of file linux-low.c.

References debug_enter, debug_exit, debug_printf(), debug_threads, for_each_thread(), gdb_assert, get_lwp_thread, NOT_STOPPING_THREADS, ptid_of(), send_sigstop(), STOPPING_AND_SUSPENDING_THREADS, stopping_threads, STOPPING_THREADS, suspend_and_send_sigstop(), target_pid_to_str(), lwp_info::thread, 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().

## ◆ stuck_in_jump_pad_callback()

static bool stuck_in_jump_pad_callback | ( | thread_info * | thread | ) |
| static

Definition at line 4051 of file linux-low.c.

References agent_loaded_p(), gdb_assert, gdb_breakpoint_here(), get_thread_lwp, internal_error(), thread_info::last_resume_kind, linux_fast_tracepoint_collecting(), lwpid_of(), not_collecting, lwp_info::stop_pc, lwp_info::stop_reason, lwp_info::stopped, supports_fast_tracepoints(), lwp_info::suspended, and lwp_info::thread.

Referenced by linux_stabilize_threads().

## ◆ supports_breakpoints()

static int supports_breakpoints | ( | void |  | ) |
| static

Definition at line 312 of file linux-low.c.

References linux_target_ops::get_pc, and the_low_target.

Referenced by linux_resume(), linux_wait_1(), and proceed_all_lwps().

## ◆ supports_fast_tracepoints()

static int supports_fast_tracepoints | ( | void |  | ) |
| static

Definition at line 322 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().

## ◆ suspend_and_send_sigstop()

static void suspend_and_send_sigstop | ( | thread_info * | thread,
|  | lwp_info * | except
| ) |  |
| static

Definition at line 3954 of file linux-low.c.

References get_thread_lwp, lwp_suspended_inc(), send_sigstop(), and lwp_info::thread.

Referenced by stop_all_lwps().

## ◆ thread_still_has_status_pending_p()

static int thread_still_has_status_pending_p | ( | struct thread_info * | thread | ) |
| static

Definition at line 1704 of file linux-low.c.

References linux_target_ops::breakpoint_at, current_thread, debug_printf(), debug_threads, gdb_assert, get_pc(), get_thread_lwp, hardware_breakpoint_inserted_here(), thread_info::last_resume_kind, lwp_info::last_status, lwpid_of(), lwp_info::status_pending_p, lwp_info::stop_pc, lwp_info::stop_reason, the_low_target, and lwp_info::thread.

Referenced by resume_status_pending_p(), and status_pending_p_callback().

## ◆ unstop_all_lwps()

static void unstop_all_lwps | ( | int | unsuspend,
|  | struct lwp_info * | except
| ) |  |
| static

Definition at line 5263 of file linux-low.c.

References debug_enter, debug_exit, debug_printf(), debug_threads, for_each_thread(), get_lwp_thread, lwpid_of(), proceed_one_lwp(), and unsuspend_and_proceed_one_lwp().

Referenced by linux_detach(), linux_kill(), linux_unpause_all(), linux_wait_1(), and maybe_move_out_of_jump_pad().

## ◆ unsuspend_all_lwps()

static void unsuspend_all_lwps | ( | struct lwp_info * | except | ) |
| static

Definition at line 2909 of file linux-low.c.

References for_each_thread(), get_thread_lwp, lwp_suspended_decr(), and lwp_info::thread.

Referenced by complete_ongoing_step_over(), linux_low_filter_event(), linux_stabilize_threads(), and linux_wait_1().

## ◆ unsuspend_and_proceed_one_lwp()

static void unsuspend_and_proceed_one_lwp | ( | thread_info * | thread,
|  | lwp_info * | except
| ) |  |
| static

Definition at line 5207 of file linux-low.c.

References get_thread_lwp, lwp_suspended_decr(), proceed_one_lwp(), and lwp_info::thread.

Referenced by unstop_all_lwps().

## ◆ wait_for_sigstop()

static void wait_for_sigstop | ( | void |  | ) |
| static

Definition at line 4008 of file linux-low.c.

References __WALL, current_thread, debug_printf(), debug_threads, gdb_assert, thread_info::id, linux_thread_alive(), linux_wait_for_event_filtered(), minus_one_ptid, and null_ptid.

Referenced by stop_all_lwps().

## Variable Documentation

## ◆ have_ptrace_getregset

int have_ptrace_getregset = -1

Definition at line 137 of file linux-low.c.

Referenced by arm_arch_setup(), arm_regs_info(), and x86_linux_read_description().

## ◆ linux_event_pipe

int linux_event_pipe[2] = { -1, -1 }
| static

Definition at line 346 of file linux-low.c.

Referenced by async_file_flush(), async_file_mark(), and linux_async().

## ◆ linux_target_ops

struct target_ops linux_target_ops
| static

Definition at line 7447 of file linux-low.c.

## ◆ stabilizing_threads

int stabilizing_threads
| static

Definition at line 259 of file linux-low.c.

Referenced by handle_tracepoints(), linux_resume_one_lwp_throw(), linux_stabilize_threads(), and linux_wait_1().

## ◆ step_over_bkpt

ptid_t step_over_bkpt

Definition at line 286 of file linux-low.c.

Referenced by complete_ongoing_step_over(), finish_step_over(), linux_wait_1(), and start_step_over().

## ◆ stopped_pids

struct simple_pid_list* stopped_pids

Definition at line 205 of file linux-low.c.

Referenced by handle_extended_wait(), and linux_low_filter_event().

## ◆ stopping_threads

enum stopping_threads_kind stopping_threads = NOT_STOPPING_THREADS

Definition at line 252 of file linux-low.c.

Referenced by handle_extended_wait(), linux_low_filter_event(), linux_wait_for_event_filtered(), and stop_all_lwps().

## ◆ using_threads

int using_threads = 1

Definition at line 255 of file linux-low.c.