+class record_btrace_target final : public target_ops
+{
+public:
+ const target_info &info () const override
+ { return record_btrace_target_info; }
+
+ strata stratum () const override { return record_stratum; }
+
+ void close () override;
+ void async (int) override;
+
+ void detach (inferior *inf, int from_tty) override
+ { record_detach (this, inf, from_tty); }
+
+ void disconnect (const char *, int) override;
+
+ void mourn_inferior () override
+ { record_mourn_inferior (this); }
+
+ void kill () override
+ { record_kill (this); }
+
+ enum record_method record_method (ptid_t ptid) override;
+
+ void stop_recording () override;
+ void info_record () override;
+
+ void insn_history (int size, gdb_disassembly_flags flags) override;
+ void insn_history_from (ULONGEST from, int size,
+ gdb_disassembly_flags flags) override;
+ void insn_history_range (ULONGEST begin, ULONGEST end,
+ gdb_disassembly_flags flags) override;
+ void call_history (int size, record_print_flags flags) override;
+ void call_history_from (ULONGEST begin, int size, record_print_flags flags)
+ override;
+ void call_history_range (ULONGEST begin, ULONGEST end, record_print_flags flags)
+ override;
+
+ bool record_is_replaying (ptid_t ptid) override;
+ bool record_will_replay (ptid_t ptid, int dir) override;
+ void record_stop_replaying () override;
+
+ enum target_xfer_status xfer_partial (enum target_object object,
+ const char *annex,
+ gdb_byte *readbuf,
+ const gdb_byte *writebuf,
+ ULONGEST offset, ULONGEST len,
+ ULONGEST *xfered_len) override;
+
+ int insert_breakpoint (struct gdbarch *,
+ struct bp_target_info *) override;
+ int remove_breakpoint (struct gdbarch *, struct bp_target_info *,
+ enum remove_bp_reason) override;
+
+ void fetch_registers (struct regcache *, int) override;
+
+ void store_registers (struct regcache *, int) override;
+ void prepare_to_store (struct regcache *) override;
+
+ const struct frame_unwind *get_unwinder () override;
+
+ const struct frame_unwind *get_tailcall_unwinder () override;
+
+ void commit_resume () override;
+ void resume (ptid_t, int, enum gdb_signal) override;
+ ptid_t wait (ptid_t, struct target_waitstatus *, int) override;
+
+ void stop (ptid_t) override;
+ void update_thread_list () override;
+ bool thread_alive (ptid_t ptid) override;
+ void goto_record_begin () override;
+ void goto_record_end () override;
+ void goto_record (ULONGEST insn) override;
+
+ bool can_execute_reverse () override;
+
+ bool stopped_by_sw_breakpoint () override;
+ bool supports_stopped_by_sw_breakpoint () override;
+
+ bool stopped_by_hw_breakpoint () override;
+ bool supports_stopped_by_hw_breakpoint () override;
+
+ enum exec_direction_kind execution_direction () override;
+ void prepare_to_generate_core () override;
+ void done_generating_core () override;
+};
+
+static record_btrace_target record_btrace_ops;
+
+/* Initialize the record-btrace target ops. */
+
+/* Token associated with a new-thread observer enabling branch tracing
+ for the new thread. */
+static const gdb::observers::token record_btrace_thread_observer_token {};