+/* PER-event mask bits and PER control bits (CR9). */
+
+#define PER_BIT(n) (1UL << (63 - (n)))
+#define PER_EVENT_BRANCH PER_BIT (32)
+#define PER_EVENT_IFETCH PER_BIT (33)
+#define PER_EVENT_STORE PER_BIT (34)
+#define PER_EVENT_NULLIFICATION PER_BIT (39)
+#define PER_CONTROL_BRANCH_ADDRESS PER_BIT (40)
+#define PER_CONTROL_SUSPENSION PER_BIT (41)
+#define PER_CONTROL_ALTERATION PER_BIT (42)
+
+class s390_linux_nat_target final : public linux_nat_target
+{
+public:
+ /* Add our register access methods. */
+ void fetch_registers (struct regcache *, int) override;
+ void store_registers (struct regcache *, int) override;
+
+ /* Add our watchpoint methods. */
+ int can_use_hw_breakpoint (enum bptype, int, int) override;
+ int insert_hw_breakpoint (struct gdbarch *, struct bp_target_info *)
+ override;
+ int remove_hw_breakpoint (struct gdbarch *, struct bp_target_info *)
+ override;
+ int region_ok_for_hw_watchpoint (CORE_ADDR, int) override;
+ bool stopped_by_watchpoint () override;
+ int insert_watchpoint (CORE_ADDR, int, enum target_hw_bp_type,
+ struct expression *) override;
+ int remove_watchpoint (CORE_ADDR, int, enum target_hw_bp_type,
+ struct expression *) override;
+
+ /* Detect target architecture. */
+ const struct target_desc *read_description () override;
+ int auxv_parse (gdb_byte **readptr,
+ gdb_byte *endptr, CORE_ADDR *typep, CORE_ADDR *valp)
+ override;
+
+ /* Override linux_nat_target low methods. */
+ void low_new_thread (struct lwp_info *lp) override;
+ void low_delete_thread (struct arch_lwp_info *lp) override;
+ void low_prepare_to_resume (struct lwp_info *lp) override;
+ void low_new_fork (struct lwp_info *parent, pid_t child_pid) override;
+ void low_forget_process (pid_t pid) override;
+};
+
+static s390_linux_nat_target the_s390_linux_nat_target;
+