diff options
Diffstat (limited to 'gdb/linux-tdep.h')
-rw-r--r-- | gdb/linux-tdep.h | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/gdb/linux-tdep.h b/gdb/linux-tdep.h index 7485fc1..a4f0f53 100644 --- a/gdb/linux-tdep.h +++ b/gdb/linux-tdep.h @@ -22,10 +22,22 @@ #include "bfd.h" #include "displaced-stepping.h" +#include "solib.h" struct inferior; struct regcache; +#ifndef SEGV_CPERR +#define SEGV_CPERR 10 /* Control protection error. */ +#endif + +/* Flag which enables shadow stack in PR_SET_SHADOW_STACK_STATUS prctl. */ +#ifndef PR_SHADOW_STACK_ENABLE +#define PR_SHADOW_STACK_ENABLE (1UL << 0) +#define PR_SHADOW_STACK_WRITE (1UL << 1) +#define PR_SHADOW_STACK_PUSH (1UL << 2) +#endif + /* Enum used to define the extra fields of the siginfo type used by an architecture. */ enum linux_siginfo_extra_field_values @@ -112,9 +124,11 @@ extern CORE_ADDR linux_get_hwcap2 (const std::optional<gdb::byte_vector> &auxv, extern CORE_ADDR linux_get_hwcap2 (); -/* 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 (); +/* Returns true if ADDR belongs to a shadow stack memory range. If this + is the case, assign the shadow stack memory range to RANGE + [start_address, end_address). */ + +extern bool linux_address_in_shadow_stack_mem_range + (CORE_ADDR addr, std::pair<CORE_ADDR, CORE_ADDR> *range); #endif /* GDB_LINUX_TDEP_H */ |