GDB (xrefs)

Classes | Macros | Typedefs | Enumerations | Functions | Variables
/tmp/gdb-8.1/gdb/linux-tdep.c File Reference
`#include "defs.h"`
`#include "gdbtypes.h"`
`#include "linux-tdep.h"`
`#include "auxv.h"`
`#include "target.h"`
`#include "gdbthread.h"`
`#include "gdbcore.h"`
`#include "regcache.h"`
`#include "regset.h"`
`#include "elf/common.h"`
`#include "elf-bfd.h"`
`#include "inferior.h"`
`#include "cli/cli-utils.h"`
`#include "arch-utils.h"`
`#include "gdb_obstack.h"`
`#include "observer.h"`
`#include "objfiles.h"`
`#include "infcall.h"`
`#include "gdbcmd.h"`
`#include "gdb_regex.h"`
`#include "common/enum-flags.h"`
`#include "common/gdb_optional.h"`
`#include <ctype.h>`

Go to the source code of this file.

## Classes
struct | smaps_vmflags
struct | linux_gdbarch_data
struct | linux_info
struct | mapping_regexes
struct | linux_find_memory_regions_data
struct | linux_make_mappings_data
struct | linux_collect_regset_section_cb_data
struct | linux_corefile_thread_data

## Macros
#define | GDB_MMAP_MAP_PRIVATE 0x02 /* Changes are private. */
#define | GDB_MMAP_MAP_ANONYMOUS 0x20 /* Don't use a file. */

## Typedefs
typedef int | linux_find_memory_region_ftype(ULONGEST vaddr, ULONGEST size, ULONGEST offset, ULONGEST inode, int read, int write, int exec, int modified, const char *filename, void *data)

## Enumerations
enum | filter_flag { COREFILTER_ANON_PRIVATE = 1 << 0, COREFILTER_ANON_SHARED = 1 << 1, COREFILTER_MAPPED_PRIVATE = 1 << 2, COREFILTER_MAPPED_SHARED = 1 << 3, COREFILTER_ELF_HEADERS = 1 << 4, COREFILTER_HUGETLB_PRIVATE = 1 << 5, COREFILTER_HUGETLB_SHARED = 1 << 6 }
enum | { LINUX_SIGHUP = 1, LINUX_SIGINT = 2, LINUX_SIGQUIT = 3, LINUX_SIGILL = 4, LINUX_SIGTRAP = 5, LINUX_SIGABRT = 6, LINUX_SIGIOT = 6, LINUX_SIGBUS = 7, LINUX_SIGFPE = 8, LINUX_SIGKILL = 9, LINUX_SIGUSR1 = 10, LINUX_SIGSEGV = 11, LINUX_SIGUSR2 = 12, LINUX_SIGPIPE = 13, LINUX_SIGALRM = 14, LINUX_SIGTERM = 15, LINUX_SIGSTKFLT = 16, LINUX_SIGCHLD = 17, LINUX_SIGCONT = 18, LINUX_SIGSTOP = 19, LINUX_SIGTSTP = 20, LINUX_SIGTTIN = 21, LINUX_SIGTTOU = 22, LINUX_SIGURG = 23, LINUX_SIGXCPU = 24, LINUX_SIGXFSZ = 25, LINUX_SIGVTALRM = 26, LINUX_SIGPROF = 27, LINUX_SIGWINCH = 28, LINUX_SIGIO = 29, LINUX_SIGPOLL = LINUX_SIGIO, LINUX_SIGPWR = 30, LINUX_SIGSYS = 31, LINUX_SIGUNUSED = 31, LINUX_SIGRTMIN = 32, LINUX_SIGRTMAX = 64 }

## Functions
| DEF_ENUM_FLAGS_TYPE (enum filter_flag, filter_flags)
static void * | init_linux_gdbarch_data (struct gdbarch *gdbarch)
static struct linux_gdbarch_data * | get_linux_gdbarch_data (struct gdbarch *gdbarch)
static void | invalidate_linux_cache_inf (struct inferior *inf)
static void | linux_inferior_data_cleanup (struct inferior *inf, void *arg)
static struct linux_info * | get_linux_inferior_data (void)
struct type * | linux_get_siginfo_type_with_fields (struct gdbarch *gdbarch, linux_siginfo_extra_fields extra_fields)
static struct type * | linux_get_siginfo_type (struct gdbarch *gdbarch)
int | linux_is_uclinux (void)
static int | linux_has_shared_address_space (struct gdbarch *gdbarch)
static const char * | linux_core_pid_to_str (struct gdbarch *gdbarch, ptid_t ptid)
static void | read_mapping (const char *line, ULONGEST *addr, ULONGEST *endaddr, const char **permissions, size_t *permissions_len, ULONGEST *offset, const char **device, size_t *device_len, ULONGEST *inode, const char **filename)
static void | decode_vmflags (char *p, struct smaps_vmflags *v)
static int | mapping_is_anonymous_p (const char *filename)
static int | dump_mapping_p (filter_flags filterflags, const struct smaps_vmflags *v, int maybe_private_p, int mapping_anon_p, int mapping_file_p, const char *filename)
static void | linux_info_proc (struct gdbarch *gdbarch, const char *args, enum info_proc_what what)
static void | linux_core_info_proc_mappings (struct gdbarch *gdbarch, const char *args)
static void | linux_core_info_proc (struct gdbarch *gdbarch, const char *args, enum info_proc_what what)
static LONGEST | linux_core_xfer_siginfo (struct gdbarch *gdbarch, gdb_byte *readbuf, ULONGEST offset, ULONGEST len)
static int | linux_find_memory_regions_full (struct gdbarch *gdbarch, linux_find_memory_region_ftype *func, void *obfd)
static int | linux_find_memory_regions_thunk (ULONGEST vaddr, ULONGEST size, ULONGEST offset, ULONGEST inode, int read, int write, int exec, int modified, const char *filename, void *arg)
static int | linux_find_memory_regions (struct gdbarch *gdbarch, find_memory_region_ftype func, void *obfd)
static int | find_signalled_thread (struct thread_info *info, void *data)
static char * | linux_spu_make_corefile_notes (bfd *obfd, char *note_data, int *note_size)
static int | linux_make_mappings_callback (ULONGEST vaddr, ULONGEST size, ULONGEST offset, ULONGEST inode, int read, int write, int exec, int modified, const char *filename, void *data)
static char * | linux_make_mappings_corefile_notes (struct gdbarch *gdbarch, bfd *obfd, char *note_data, int *note_size)
static void | linux_collect_regset_section_cb (const char *sect_name, int size, const struct regset *regset, const char *human_name, void *cb_data)
static char * | linux_collect_thread_registers (const struct regcache *regcache, ptid_t ptid, bfd *obfd, char *note_data, int *note_size, enum gdb_signal stop_signal)
static gdb::byte_vector | linux_get_siginfo_data (thread_info *thread, struct gdbarch *gdbarch)
static void | linux_corefile_thread (struct thread_info *info, struct linux_corefile_thread_data *args)
static int | linux_fill_prpsinfo (struct elf_internal_linux_prpsinfo *p)
static char * | linux_make_corefile_notes (struct gdbarch *gdbarch, bfd *obfd, int *note_size)
enum gdb_signal | linux_gdb_signal_from_target (struct gdbarch *gdbarch, int signal)
int | linux_gdb_signal_to_target (struct gdbarch *gdbarch, enum gdb_signal signal)
static int | linux_vsyscall_range_raw (struct gdbarch *gdbarch, struct mem_range *range)
static int | linux_vsyscall_range (struct gdbarch *gdbarch, struct mem_range *range)
static CORE_ADDR | linux_infcall_mmap (CORE_ADDR size, unsigned prot)
static void | linux_infcall_munmap (CORE_ADDR addr, CORE_ADDR size)
CORE_ADDR | linux_displaced_step_location (struct gdbarch *gdbarch)
static void | show_use_coredump_filter (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
static void | show_dump_excluded_mappings (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value)
void | linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch)
void | _initialize_linux_tdep (void)

## Variables
static int | use_coredump_filter = 1
static int | dump_excluded_mappings = 0
static struct gdbarch_data * | linux_gdbarch_data_handle
static const struct inferior_data * | linux_inferior_data
static linux_find_memory_region_ftype | linux_make_mappings_callback

## Macro Definition Documentation

## ◆ GDB_MMAP_MAP_ANONYMOUS

#define GDB_MMAP_MAP_ANONYMOUS 0x20 /* Don't use a file. */

Definition at line 2362 of file linux-tdep.c.

Referenced by linux_infcall_mmap().

## ◆ GDB_MMAP_MAP_PRIVATE

#define GDB_MMAP_MAP_PRIVATE 0x02 /* Changes are private. */

Definition at line 2361 of file linux-tdep.c.

Referenced by linux_infcall_mmap().

## Typedef Documentation

## ◆ linux_find_memory_region_ftype

typedef int linux_find_memory_region_ftype(ULONGEST vaddr, ULONGEST size, ULONGEST offset, ULONGEST inode, int read, int write, int exec, int modified, const char *filename, void *data)

Definition at line 1146 of file linux-tdep.c.

## Enumeration Type Documentation

## ◆ anonymous enum

anonymous enum

Enumerator
LINUX_SIGHUP |
LINUX_SIGINT |
LINUX_SIGQUIT |
LINUX_SIGILL |
LINUX_SIGTRAP |
LINUX_SIGABRT |
LINUX_SIGIOT |
LINUX_SIGBUS |
LINUX_SIGFPE |
LINUX_SIGKILL |
LINUX_SIGUSR1 |
LINUX_SIGSEGV |
LINUX_SIGUSR2 |
LINUX_SIGPIPE |
LINUX_SIGALRM |
LINUX_SIGTERM |
LINUX_SIGSTKFLT |
LINUX_SIGCHLD |
LINUX_SIGCONT |
LINUX_SIGSTOP |
LINUX_SIGTSTP |
LINUX_SIGTTIN |
LINUX_SIGTTOU |
LINUX_SIGURG |
LINUX_SIGXCPU |
LINUX_SIGXFSZ |
LINUX_SIGVTALRM |
LINUX_SIGPROF |
LINUX_SIGWINCH |
LINUX_SIGIO |
LINUX_SIGPOLL |
LINUX_SIGPWR |
LINUX_SIGSYS |
LINUX_SIGUNUSED |
LINUX_SIGRTMIN |
LINUX_SIGRTMAX |

Definition at line 125 of file linux-tdep.c.

## ◆ filter_flag

enum filter_flag

Enumerator
COREFILTER_ANON_PRIVATE |
COREFILTER_ANON_SHARED |
COREFILTER_MAPPED_PRIVATE |
COREFILTER_MAPPED_SHARED |
COREFILTER_ELF_HEADERS |
COREFILTER_HUGETLB_PRIVATE |
COREFILTER_HUGETLB_SHARED |

Definition at line 51 of file linux-tdep.c.

## Function Documentation

## ◆ _initialize_linux_tdep()

void _initialize_linux_tdep | ( | void |  | ) |

Definition at line 2513 of file linux-tdep.c.

References _, add_setshow_boolean_cmd(), class_files, dump_excluded_mappings, gdbarch_data_register_post_init(), init_linux_gdbarch_data(), invalidate_linux_cache_inf(), linux_gdbarch_data_handle, linux_inferior_data, linux_inferior_data_cleanup(), observer_attach_inferior_appeared(), observer_attach_inferior_exit(), setlist, show_dump_excluded_mappings(), show_use_coredump_filter(), showlist, and use_coredump_filter.

## ◆ decode_vmflags()

static void decode_vmflags | ( | char * | p,
|  | struct smaps_vmflags * | v
| ) |  |
| static

Definition at line 479 of file linux-tdep.c.

References smaps_vmflags::exclude_coredump, if(), smaps_vmflags::initialized_p, smaps_vmflags::io_page, smaps_vmflags::shared_mapping, skip_spaces(), skip_to_space(), and smaps_vmflags::uses_huge_tlb.

Referenced by linux_find_memory_regions_full().

## ◆ DEF_ENUM_FLAGS_TYPE()

DEF_ENUM_FLAGS_TYPE | ( | enum | filter_flag,
|  | filter_flags |
| ) |  |

## ◆ dump_mapping_p()

static int dump_mapping_p | ( | filter_flags | filterflags,
|  | const struct smaps_vmflags * | v,
|  | int | maybe_private_p,
|  | int | mapping_anon_p,
|  | int | mapping_file_p,
|  | const char * | filename
| ) |  |
| static

Definition at line 636 of file linux-tdep.c.

References COREFILTER_ANON_PRIVATE, COREFILTER_ANON_SHARED, COREFILTER_HUGETLB_PRIVATE, COREFILTER_HUGETLB_SHARED, COREFILTER_MAPPED_PRIVATE, COREFILTER_MAPPED_SHARED, dump_excluded_mappings, smaps_vmflags::exclude_coredump, smaps_vmflags::initialized_p, smaps_vmflags::io_page, smaps_vmflags::shared_mapping, and smaps_vmflags::uses_huge_tlb.

Referenced by linux_find_memory_regions_full().

## ◆ find_signalled_thread()

static int find_signalled_thread | ( | struct thread_info * | info,
|  | void * | data
| ) |  |
| static

Definition at line 1380 of file linux-tdep.c.

References inferior_ptid, thread_info::ptid, ptid_get_pid(), thread_suspend_state::stop_signal, and thread_info::suspend.

Referenced by linux_make_corefile_notes().

## ◆ get_linux_gdbarch_data()

static struct linux_gdbarch_data* get_linux_gdbarch_data | ( | struct gdbarch * | gdbarch | ) |
| static

Definition at line 180 of file linux-tdep.c.

References linux_gdbarch_data_handle.

Referenced by linux_get_siginfo_type_with_fields().

## ◆ get_linux_inferior_data()

static struct linux_info* get_linux_inferior_data | ( | void |  | ) |
| static

Definition at line 237 of file linux-tdep.c.

References current_inferior(), linux_inferior_data, and XCNEW.

Referenced by linux_vsyscall_range().

## ◆ init_linux_gdbarch_data()

static void* init_linux_gdbarch_data | ( | struct gdbarch * | gdbarch | ) |
| static

Definition at line 174 of file linux-tdep.c.

References GDBARCH_OBSTACK_ZALLOC.

Referenced by _initialize_linux_tdep().

## ◆ invalidate_linux_cache_inf()

static void invalidate_linux_cache_inf | ( | struct inferior * | inf | ) |
| static

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

References linux_inferior_data, and xfree().

Referenced by _initialize_linux_tdep(), and linux_inferior_data_cleanup().

## ◆ linux_collect_regset_section_cb()

static void linux_collect_regset_section_cb | ( | const char * | sect_name,
|  | int | size,
|  | const struct regset * | regset,
|  | const char * | human_name,
|  | void * | cb_data
| ) |  |
| static

Definition at line 1582 of file linux-tdep.c.

References linux_collect_regset_section_cb_data::abort_iteration, regset::collect_regset, gdb_assert, gdb_signal_to_host(), linux_collect_regset_section_cb_data::lwp, linux_collect_regset_section_cb_data::note_data, linux_collect_regset_section_cb_data::note_size, linux_collect_regset_section_cb_data::obfd, linux_collect_regset_section_cb_data::regcache, size, linux_collect_regset_section_cb_data::stop_signal, xfree(), and xmalloc().

Referenced by linux_collect_thread_registers().

## ◆ linux_collect_thread_registers()

static char* linux_collect_thread_registers | ( | const struct regcache * | regcache,
|  | ptid_t | ptid,
|  | bfd * | obfd,
|  | char * | note_data,
|  | int * | note_size,
|  | enum gdb_signal | stop_signal
| ) |  |
| static

Definition at line 1617 of file linux-tdep.c.

References linux_collect_regset_section_cb_data::abort_iteration, regcache::arch(), linux_collect_regset_section_cb_data::gdbarch, gdbarch_iterate_over_regset_sections(), linux_collect_regset_section_cb(), linux_collect_regset_section_cb_data::lwp, linux_collect_regset_section_cb_data::note_data, linux_collect_regset_section_cb_data::note_size, linux_collect_regset_section_cb_data::obfd, ptid_get_lwp(), ptid_get_tid(), linux_collect_regset_section_cb_data::regcache, and linux_collect_regset_section_cb_data::stop_signal.

Referenced by linux_corefile_thread().

## ◆ linux_core_info_proc()

static void linux_core_info_proc | ( | struct gdbarch * | gdbarch,
|  | const char * | args,
|  | enum info_proc_what | what
| ) |  |
| static

Definition at line 1102 of file linux-tdep.c.

References _, core_bfd, error(), IP_ALL, IP_EXE, IP_MAPPINGS, IP_MINIMAL, linux_core_info_proc_mappings(), printf_filtered(), and warning().

Referenced by linux_init_abi().

## ◆ linux_core_info_proc_mappings()

static void linux_core_info_proc_mappings | ( | struct gdbarch * | gdbarch,
|  | const char * | args
| ) |  |
| static

Definition at line 1002 of file linux-tdep.c.

References _, core_bfd, core_gdbarch, error(), gdb_static_assert, gdbarch_addr_bit(), gdbarch_from_bfd(), hex_string(), paddress(), printf_filtered(), and warning().

Referenced by linux_core_info_proc().

## ◆ linux_core_pid_to_str()

static const char* linux_core_pid_to_str | ( | struct gdbarch * | gdbarch,
|  | ptid_t | ptid
| ) |  |
| static

Definition at line 418 of file linux-tdep.c.

References normal_pid_to_str(), and ptid_get_lwp().

Referenced by linux_init_abi().

## ◆ linux_core_xfer_siginfo()

static LONGEST linux_core_xfer_siginfo | ( | struct gdbarch * | gdbarch,
|  | gdb_byte * | readbuf,
|  | ULONGEST | offset,
|  | ULONGEST | len
| ) |  |
| static

Definition at line 1132 of file linux-tdep.c.

References thread_section_name::c_str(), core_bfd, inferior_ptid, and offset.

Referenced by linux_init_abi().

## ◆ linux_corefile_thread()

static void linux_corefile_thread | ( | struct thread_info * | info,
|  | struct linux_corefile_thread_data * | args
| ) |  |
| static

Definition at line 1685 of file linux-tdep.c.

References linux_corefile_thread_data::gdbarch, get_thread_arch_regcache(), linux_collect_thread_registers(), linux_get_siginfo_data(), linux_corefile_thread_data::note_data, linux_corefile_thread_data::note_size, linux_corefile_thread_data::obfd, thread_info::ptid, regcache::regcache(), linux_corefile_thread_data::stop_signal, and target_fetch_registers().

Referenced by linux_make_corefile_notes().

## ◆ linux_displaced_step_location()

CORE_ADDR linux_displaced_step_location | ( | struct gdbarch * | gdbarch | ) |

Definition at line 2437 of file linux-tdep.c.

References _, current_target, gdbarch_breakpoint_from_pc(), gdbarch_convert_from_func_ptr_addr(), NOT_SUPPORTED_ERROR, target_auxv_search(), and throw_error().

Referenced by aarch64_linux_init_abi(), amd64_linux_init_abi_common(), arm_linux_init_abi(), i386_linux_init_abi(), ppc_linux_init_abi(), and s390_gdbarch_init().

## ◆ linux_fill_prpsinfo()

static int linux_fill_prpsinfo | ( | struct elf_internal_linux_prpsinfo * | p | ) |
| static

Definition at line 1719 of file linux-tdep.c.

References gdb_assert, get_inferior_args(), inferior_ptid, memset(), pid, ptid_get_pid(), skip_spaces(), string, target_fileio_read_stralloc(), and xsnprintf().

Referenced by linux_make_corefile_notes().

## ◆ linux_find_memory_regions()

static int linux_find_memory_regions | ( | struct gdbarch * | gdbarch,
|  | find_memory_region_ftype | func,
|  | void * | obfd
| ) |  |
| static

Definition at line 1364 of file linux-tdep.c.

References func, linux_find_memory_regions_data::func, linux_find_memory_regions_full(), linux_find_memory_regions_thunk(), and linux_find_memory_regions_data::obfd.

Referenced by linux_init_abi().

## ◆ linux_find_memory_regions_full()

static int linux_find_memory_regions_full | ( | struct gdbarch * | gdbarch,
|  | linux_find_memory_region_ftype * | func,
|  | void * | obfd
| ) |  |
| static

Definition at line 1156 of file linux-tdep.c.

References _, COREFILTER_ANON_PRIVATE, COREFILTER_ANON_SHARED, COREFILTER_ELF_HEADERS, COREFILTER_HUGETLB_PRIVATE, current_inferior(), gdbarch::data, decode_vmflags(), dump_mapping_p(), inferior::fake_pid_p, flags, func, mapping_is_anonymous_p(), memset(), offset, inferior::pid, pid, read(), read_mapping(), target_fileio_read_stralloc(), use_coredump_filter, warning(), and xsnprintf().

Referenced by linux_find_memory_regions(), and linux_make_mappings_corefile_notes().

## ◆ linux_find_memory_regions_thunk()

static int linux_find_memory_regions_thunk | ( | ULONGEST | vaddr,
|  | ULONGEST | size,
|  | ULONGEST | offset,
|  | ULONGEST | inode,
|  | int | read,
|  | int | write,
|  | int | exec,
|  | int | modified,
|  | const char * | filename,
|  | void * | arg
| ) |  |
| static

Definition at line 1349 of file linux-tdep.c.

References linux_find_memory_regions_data::func, linux_find_memory_regions_data::obfd, read(), and size.

Referenced by linux_find_memory_regions().

## ◆ linux_gdb_signal_from_target()

enum gdb_signal linux_gdb_signal_from_target | ( | struct gdbarch * | gdbarch,
|  | int | signal
| ) |  |

Definition at line 2003 of file linux-tdep.c.

References LINUX_SIGABRT, LINUX_SIGALRM, LINUX_SIGBUS, LINUX_SIGCHLD, LINUX_SIGCONT, LINUX_SIGFPE, LINUX_SIGHUP, LINUX_SIGILL, LINUX_SIGINT, LINUX_SIGIO, LINUX_SIGKILL, LINUX_SIGPIPE, LINUX_SIGPROF, LINUX_SIGPWR, LINUX_SIGQUIT, LINUX_SIGRTMAX, LINUX_SIGRTMIN, LINUX_SIGSEGV, LINUX_SIGSTOP, LINUX_SIGSYS, LINUX_SIGTERM, LINUX_SIGTRAP, LINUX_SIGTSTP, LINUX_SIGTTIN, LINUX_SIGTTOU, LINUX_SIGURG, LINUX_SIGUSR1, LINUX_SIGUSR2, LINUX_SIGVTALRM, LINUX_SIGWINCH, LINUX_SIGXCPU, LINUX_SIGXFSZ, and offset.

Referenced by alpha_linux_gdb_signal_from_target(), linux_init_abi(), mips_gdb_signal_from_target(), sparc32_linux_gdb_signal_from_target(), and xtensa_linux_gdb_signal_from_target().

## ◆ linux_gdb_signal_to_target()

int linux_gdb_signal_to_target | ( | struct gdbarch * | gdbarch,
|  | enum gdb_signal | signal
| ) |  |

Definition at line 2126 of file linux-tdep.c.

References LINUX_SIGABRT, LINUX_SIGALRM, LINUX_SIGBUS, LINUX_SIGCHLD, LINUX_SIGCONT, LINUX_SIGFPE, LINUX_SIGHUP, LINUX_SIGILL, LINUX_SIGINT, LINUX_SIGIO, LINUX_SIGKILL, LINUX_SIGPIPE, LINUX_SIGPOLL, LINUX_SIGPROF, LINUX_SIGPWR, LINUX_SIGQUIT, LINUX_SIGRTMAX, LINUX_SIGRTMIN, LINUX_SIGSEGV, LINUX_SIGSTOP, LINUX_SIGSYS, LINUX_SIGTERM, LINUX_SIGTRAP, LINUX_SIGTSTP, LINUX_SIGTTIN, LINUX_SIGTTOU, LINUX_SIGURG, LINUX_SIGUSR1, LINUX_SIGUSR2, LINUX_SIGVTALRM, LINUX_SIGWINCH, LINUX_SIGXCPU, LINUX_SIGXFSZ, and offset.

Referenced by alpha_linux_gdb_signal_to_target(), linux_init_abi(), mips_gdb_signal_to_target(), sparc32_linux_gdb_signal_to_target(), and xtensa_linux_gdb_signal_to_target().

## ◆ linux_get_siginfo_data()

static gdb::byte_vector linux_get_siginfo_data | ( | thread_info * | thread,
|  | struct gdbarch * | gdbarch
| ) |  |
| static

Definition at line 1649 of file linux-tdep.c.

References current_target, gdbarch_get_siginfo_type(), gdbarch_get_siginfo_type_p(), inferior_ptid, make_scoped_restore(), thread_info::ptid, TARGET_OBJECT_SIGNAL_INFO, target_read(), and TYPE_LENGTH.

Referenced by linux_corefile_thread().

## ◆ linux_get_siginfo_type()

static struct type* linux_get_siginfo_type | ( | struct gdbarch * | gdbarch | ) |
| static

Definition at line 392 of file linux-tdep.c.

References linux_get_siginfo_type_with_fields().

Referenced by linux_init_abi().

## ◆ linux_get_siginfo_type_with_fields()

struct type* linux_get_siginfo_type_with_fields | ( | struct gdbarch * | gdbarch,
|  | linux_siginfo_extra_fields | extra_fields
| ) |  |

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

References append_composite_type_field(), append_composite_type_field_aligned(), arch_composite_type(), arch_integer_type(), arch_type(), gdbarch_int_bit(), gdbarch_long_bit(), gdbarch_ptr_bit(), get_linux_gdbarch_data(), HOST_CHAR_BIT, init_vector_type(), LINUX_SIGINFO_FIELD_ADDR_BND, lookup_pointer_type(), linux_gdbarch_data::siginfo_type, TARGET_CHAR_BIT, type, TYPE_CODE_STRUCT, TYPE_CODE_TYPEDEF, TYPE_CODE_UNION, TYPE_LENGTH, TYPE_NAME, TYPE_TARGET_STUB, and TYPE_TARGET_TYPE.

Referenced by linux_get_siginfo_type(), and x86_linux_get_siginfo_type().

## ◆ linux_has_shared_address_space()

static int linux_has_shared_address_space | ( | struct gdbarch * | gdbarch | ) |
| static

Definition at line 410 of file linux-tdep.c.

References linux_is_uclinux().

Referenced by linux_init_abi().

## ◆ linux_infcall_mmap()

static CORE_ADDR linux_infcall_mmap | ( | CORE_ADDR | size,
|  | unsigned | prot
| ) |  |
| static

Definition at line 2367 of file linux-tdep.c.

References _, call_function_by_hand(), error(), find_function_in_inferior(), gdb_assert, GDB_MMAP_MAP_ANONYMOUS, GDB_MMAP_MAP_PRIVATE, GDB_MMAP_PROT_EXEC, GDB_MMAP_PROT_READ, GDB_MMAP_PROT_WRITE, get_objfile_arch(), pulongest(), size, value_as_address(), value_from_longest(), value_from_pointer(), and value_from_ulongest().

Referenced by linux_init_abi().

## ◆ linux_infcall_munmap()

static void linux_infcall_munmap | ( | CORE_ADDR | addr,
|  | CORE_ADDR | size
| ) |  |
| static

Definition at line 2408 of file linux-tdep.c.

References _, call_function_by_hand(), find_function_in_inferior(), get_objfile_arch(), hex_string(), pulongest(), size, value_as_long(), value_from_pointer(), value_from_ulongest(), and warning().

Referenced by linux_init_abi().

## ◆ linux_inferior_data_cleanup()

static void linux_inferior_data_cleanup | ( | struct inferior * | inf,
|  | void * | arg
| ) |  |
| static

Definition at line 228 of file linux-tdep.c.

References invalidate_linux_cache_inf().

Referenced by _initialize_linux_tdep().

## ◆ linux_info_proc()

static void linux_info_proc | ( | struct gdbarch * | gdbarch,
|  | const char * | args,
|  | enum info_proc_what | what
| ) |  |
| static

Definition at line 716 of file linux-tdep.c.

References _, current_inferior(), do_cleanups(), error(), gdbarch_addr_bit(), hex_string(), IP_ALL, IP_CMDLINE, IP_CWD, IP_EXE, IP_MAPPINGS, IP_MINIMAL, IP_STAT, IP_STATUS, make_cleanup(), offset, paddress(), inferior::pid, pid, printf_filtered(), pulongest(), puts_filtered(), read_mapping(), skip_spaces(), status, strtoulst(), target_fileio_read_stralloc(), target_fileio_readlink(), target_has_execution, warning(), xfree(), and xsnprintf().

Referenced by linux_init_abi().

## ◆ linux_init_abi()

void linux_init_abi | ( | struct gdbarch_info | info,
|  | struct gdbarch * | gdbarch
| ) |  |

Definition at line 2492 of file linux-tdep.c.

References linux_core_info_proc(), linux_core_pid_to_str(), linux_core_xfer_siginfo(), linux_find_memory_regions(), linux_gdb_signal_from_target(), linux_gdb_signal_to_target(), linux_get_siginfo_type(), linux_has_shared_address_space(), linux_infcall_mmap(), linux_infcall_munmap(), linux_info_proc(), linux_make_corefile_notes(), linux_vsyscall_range(), set_gdbarch_core_info_proc(), set_gdbarch_core_pid_to_str(), set_gdbarch_core_xfer_siginfo(), set_gdbarch_find_memory_regions(), set_gdbarch_gdb_signal_from_target(), set_gdbarch_gdb_signal_to_target(), set_gdbarch_get_siginfo_type(), set_gdbarch_has_shared_address_space(), set_gdbarch_infcall_mmap(), set_gdbarch_infcall_munmap(), set_gdbarch_info_proc(), set_gdbarch_make_corefile_notes(), and set_gdbarch_vsyscall_range().

Referenced by aarch64_linux_init_abi(), alpha_linux_init_abi(), am33_linux_init_osabi(), amd64_linux_init_abi_common(), arm_linux_init_abi(), bfin_linux_init_abi(), cris_linux_init_abi(), frv_linux_init_abi(), hppa_linux_init_abi(), i386_linux_init_abi(), ia64_linux_init_abi(), m32r_linux_init_abi(), m68k_linux_init_abi(), microblaze_linux_init_abi(), mips_linux_init_abi(), nios2_linux_init_abi(), ppc_linux_init_abi(), s390_gdbarch_init(), sh_linux_init_abi(), sparc32_linux_init_abi(), sparc64_linux_init_abi(), tic6x_uclinux_init_abi(), tilegx_linux_init_abi(), and xtensa_linux_init_abi().

## ◆ linux_is_uclinux()

int linux_is_uclinux | ( | void |  | ) |

Definition at line 401 of file linux-tdep.c.

References current_target, dummy, and target_auxv_search().

Referenced by linux_has_shared_address_space(), and m68k_linux_get_sigtramp_info().

## ◆ linux_make_corefile_notes()

static char* linux_make_corefile_notes | ( | struct gdbarch * | gdbarch,
|  | bfd * | obfd,
|  | int * | note_size
| ) |  |
| static

Definition at line 1903 of file linux-tdep.c.

References ALL_NON_EXITED_THREADS, CATCH, current_target, END_CATCH, exception_print(), find_signalled_thread(), gdb_stderr, linux_corefile_thread_data::gdbarch, gdbarch_iterate_over_regset_sections_p(), gdbarch_ptr_bit(), inferior_ptid, inferior_thread(), iterate_over_threads(), linux_corefile_thread(), linux_fill_prpsinfo(), linux_make_mappings_corefile_notes(), linux_spu_make_corefile_notes(), linux_corefile_thread_data::note_data, linux_corefile_thread_data::note_size, linux_corefile_thread_data::obfd, thread_info::ptid, ptid_get_pid(), RETURN_MASK_ERROR, thread_suspend_state::stop_signal, linux_corefile_thread_data::stop_signal, thread_info::suspend, TARGET_OBJECT_AUXV, target_read_alloc(), TRY, update_thread_list(), and xfree().

Referenced by linux_init_abi().

## ◆ linux_make_mappings_callback()

static int linux_make_mappings_callback | ( | ULONGEST | vaddr,
|  | ULONGEST | size,
|  | ULONGEST | offset,
|  | ULONGEST | inode,
|  | int | read,
|  | int | write,
|  | int | exec,
|  | int | modified,
|  | const char * | filename,
|  | void * | data
| ) |  |
| static

Definition at line 1486 of file linux-tdep.c.

References linux_make_mappings_data::data_obstack, linux_make_mappings_data::file_count, linux_make_mappings_data::filename_obstack, linux_make_mappings_data::long_type, obstack_grow_str0, offset, pack_long(), size, and TYPE_LENGTH.

## ◆ linux_make_mappings_corefile_notes()

static char* linux_make_mappings_corefile_notes | ( | struct gdbarch * | gdbarch,
|  | bfd * | obfd,
|  | char * | note_data,
|  | int * | note_size
| ) |  |
| static

Definition at line 1518 of file linux-tdep.c.

References arch_integer_type(), linux_make_mappings_data::data_obstack, linux_make_mappings_data::file_count, linux_make_mappings_data::filename_obstack, gdbarch_long_bit(), linux_find_memory_regions_full(), linux_make_mappings_callback, linux_make_mappings_data::long_type, pack_long(), and TYPE_LENGTH.

Referenced by linux_make_corefile_notes().

## ◆ linux_spu_make_corefile_notes()

static char* linux_spu_make_corefile_notes | ( | bfd * | obfd,
|  | char * | note_data,
|  | int * | note_size
| ) |  |
| static

Definition at line 1392 of file linux-tdep.c.

References current_target, extract_unsigned_integer(), gdbarch_byte_order(), linux_find_memory_regions_data::obfd, size, target_gdbarch(), TARGET_OBJECT_SPU, target_read_alloc(), xfree(), and xsnprintf().

Referenced by linux_make_corefile_notes().

## ◆ linux_vsyscall_range()

static int linux_vsyscall_range | ( | struct gdbarch * | gdbarch,
|  | struct mem_range * | range
| ) |  |
| static

Definition at line 2340 of file linux-tdep.c.

References get_linux_inferior_data(), linux_vsyscall_range_raw(), linux_info::vsyscall_range, and linux_info::vsyscall_range_p.

Referenced by linux_init_abi().

## ◆ linux_vsyscall_range_raw()

static int linux_vsyscall_range_raw | ( | struct gdbarch * | gdbarch,
|  | struct mem_range * | range
| ) |  |
| static

Definition at line 2253 of file linux-tdep.c.

References _, core_bfd, current_inferior(), current_target, range::length, inferior::pid, pid, strtoulst(), target_auxv_search(), target_fileio_read_stralloc(), target_has_execution, warning(), and xsnprintf().

Referenced by linux_vsyscall_range().

## ◆ mapping_is_anonymous_p()

static int mapping_is_anonymous_p | ( | const char * | filename | ) |
| static

Definition at line 552 of file linux-tdep.c.

References mapping_regexes::dev_zero, gdb::optional< T >::emplace(), compiled_regex::exec(), mapping_regexes::file_deleted, and mapping_regexes::shmem_file.

Referenced by linux_find_memory_regions_full().

## ◆ read_mapping()

static void read_mapping | ( | const char * | line,
|  | ULONGEST * | addr,
|  | ULONGEST * | endaddr,
|  | const char ** | permissions,
|  | size_t * | permissions_len,
|  | ULONGEST * | offset,
|  | const char ** | device,
|  | size_t * | device_len,
|  | ULONGEST * | inode,
|  | const char ** | filename
| ) |  |
| static

Definition at line 434 of file linux-tdep.c.

References offset, skip_spaces(), and strtoulst().

Referenced by linux_find_memory_regions_full(), and linux_info_proc().

## ◆ show_dump_excluded_mappings()

static void show_dump_excluded_mappings | ( | struct ui_file * | file,
|  | int | from_tty,
|  | struct cmd_list_element * | c,
|  | const char * | value
| ) |  |
| static

Definition at line 2481 of file linux-tdep.c.

References _, and fprintf_filtered().

Referenced by _initialize_linux_tdep().

## ◆ show_use_coredump_filter()

static void show_use_coredump_filter | ( | struct ui_file * | file,
|  | int | from_tty,
|  | struct cmd_list_element * | c,
|  | const char * | value
| ) |  |
| static

Definition at line 2470 of file linux-tdep.c.

References _, and fprintf_filtered().

Referenced by _initialize_linux_tdep().

## Variable Documentation

## ◆ dump_excluded_mappings

int dump_excluded_mappings = 0
| static

Definition at line 99 of file linux-tdep.c.

Referenced by _initialize_linux_tdep(), and dump_mapping_p().

## ◆ linux_gdbarch_data_handle

struct gdbarch_data* linux_gdbarch_data_handle
| static

Definition at line 166 of file linux-tdep.c.

Referenced by _initialize_linux_tdep(), and get_linux_gdbarch_data().

## ◆ linux_inferior_data

const struct inferior_data* linux_inferior_data
| static

Definition at line 187 of file linux-tdep.c.

Referenced by _initialize_linux_tdep(), get_linux_inferior_data(), and invalidate_linux_cache_inf().

## ◆ linux_make_mappings_callback

linux_find_memory_region_ftype linux_make_mappings_callback
| static

Definition at line 1480 of file linux-tdep.c.

Referenced by linux_make_mappings_corefile_notes().

## ◆ use_coredump_filter

int use_coredump_filter = 1
| static

Definition at line 94 of file linux-tdep.c.

Referenced by _initialize_linux_tdep(), and linux_find_memory_regions_full().