X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=gdb%2Flinux-tdep.h;h=bb907f2c8f3547b8a4402e0941bea49f77a1ed23;hb=0d02e70b197c786f26175b9a73f94e01d14abdab;hp=380507e96749d79ca12a015470fead9f5b93d964;hpb=28e7fd62340426746f9c896cbc40c5d374ec47aa;p=binutils-gdb.git diff --git a/gdb/linux-tdep.h b/gdb/linux-tdep.h index 380507e9674..bb907f2c8f3 100644 --- a/gdb/linux-tdep.h +++ b/gdb/linux-tdep.h @@ -1,6 +1,6 @@ /* Target-dependent code for GNU/Linux, architecture independent. - Copyright (C) 2009-2013 Free Software Foundation, Inc. + Copyright (C) 2009-2022 Free Software Foundation, Inc. This file is part of GDB. @@ -21,19 +21,86 @@ #define LINUX_TDEP_H #include "bfd.h" +#include "displaced-stepping.h" +struct inferior; struct regcache; +/* Enum used to define the extra fields of the siginfo type used by an + architecture. */ +enum linux_siginfo_extra_field_values +{ + /* Add bound fields into the segmentation fault field. */ + LINUX_SIGINFO_FIELD_ADDR_BND = 1 +}; + +/* Defines a type for the values defined in linux_siginfo_extra_field_values. */ +DEF_ENUM_FLAGS_TYPE (enum linux_siginfo_extra_field_values, + linux_siginfo_extra_fields); + +/* This function is suitable for architectures that + extend/override the standard siginfo in a specific way. */ +struct type *linux_get_siginfo_type_with_fields (struct gdbarch *gdbarch, + linux_siginfo_extra_fields); + +/* Return true if ADDRESS is within the boundaries of a page mapped with + memory tagging protection. */ +bool linux_address_in_memtag_page (CORE_ADDR address); + typedef char *(*linux_collect_thread_registers_ftype) (const struct regcache *, ptid_t, bfd *, char *, int *, enum gdb_signal); -char *linux_make_corefile_notes (struct gdbarch *, bfd *, int *, - linux_collect_thread_registers_ftype); +extern enum gdb_signal linux_gdb_signal_from_target (struct gdbarch *gdbarch, + int signal); + +extern int linux_gdb_signal_to_target (struct gdbarch *gdbarch, + enum gdb_signal signal); + +/* Default GNU/Linux implementation of `displaced_step_location', as + defined in gdbarch.h. Determines the entry point from AT_ENTRY in + the target auxiliary vector. */ +extern CORE_ADDR linux_displaced_step_location (struct gdbarch *gdbarch); + + +/* Implementation of gdbarch_displaced_step_prepare. */ + +extern displaced_step_prepare_status linux_displaced_step_prepare + (gdbarch *arch, thread_info *thread, CORE_ADDR &displaced_pc); + +/* Implementation of gdbarch_displaced_step_finish. */ + +extern displaced_step_finish_status linux_displaced_step_finish + (gdbarch *arch, thread_info *thread, gdb_signal sig); + +/* Implementation of gdbarch_displaced_step_copy_insn_closure_by_addr. */ + +extern const displaced_step_copy_insn_closure * + linux_displaced_step_copy_insn_closure_by_addr + (inferior *inf, CORE_ADDR addr); + +/* Implementation of gdbarch_displaced_step_restore_all_in_ptid. */ + +extern void linux_displaced_step_restore_all_in_ptid (inferior *parent_inf, + ptid_t ptid); + +extern void linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch, + int num_disp_step_buffers); + +extern int linux_is_uclinux (void); + +/* Fetch the AT_HWCAP entry from the auxv vector for the given TARGET. On + error, 0 is returned. */ +extern CORE_ADDR linux_get_hwcap (struct target_ops *target); -struct type *linux_get_siginfo_type (struct gdbarch *); +/* Fetch the AT_HWCAP2 entry from the auxv vector for the given TARGET. On + error, 0 is returned. */ +extern CORE_ADDR linux_get_hwcap2 (struct target_ops *target); -extern void linux_init_abi (struct gdbarch_info info, struct gdbarch *gdbarch); +/* Fetch (and possibly build) an appropriate `struct link_map_offsets' + for ILP32 and LP64 Linux systems. */ +extern struct link_map_offsets *linux_ilp32_fetch_link_map_offsets (); +extern struct link_map_offsets *linux_lp64_fetch_link_map_offsets (); #endif /* linux-tdep.h */