+2020-02-20 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
+
+ * target.h (class process_target): New class definition.
+ (struct process_stratum_target) <pt>: New field with type
+ 'process_target*'.
+ * linux-low.h (class linux_process_target): Define as a derived
+ class of 'process_target'.
+ * linux-low.cc (linux_target_ops): Add a linux_process_target*
+ as the 'pt' field.
+ * lynx-low.h (class lynx_process_target): Define as a derived
+ class of 'process_target'.
+ * lynx-low.cc (lynx_target_ops): Add a lynx_process_target*
+ as the 'pt' field.
+ * nto-low.h (class nto_process_target): Define as a derived
+ class of 'process_target'.
+ * nto-low.cc (nto_target_ops): Add an nto_process_target*
+ as the 'pt' field.
+ * win32-low.h (class win32_process_target): Define as a derived
+ class of 'process_target'.
+ * win32-low.cc (win32_target_ops): Add a win32_process_target*
+ as the 'pt' field.
+
2020-02-19 Andrew Burgess <andrew.burgess@embecosm.com>
* configure: Regenerate.
return hwcap2;
}
+/* The linux target ops object. */
+
+static linux_process_target the_linux_target;
+
static process_stratum_target linux_target_ops = {
linux_create_inferior,
linux_post_create_inferior,
#else
NULL,
#endif
+ &the_linux_target,
};
#ifdef HAVE_LINUX_REGSETS
extern struct linux_target_ops the_low_target;
+/* Target ops definitions for a Linux target. */
+
+class linux_process_target : public process_target
+{
+public:
+
+};
+
#define get_thread_lwp(thr) ((struct lwp_info *) (thread_target_data (thr)))
#define get_lwp_thread(lwp) ((lwp)->thread)
kill (lynx_ptid_get_pid (inferior_ptid), SIGINT);
}
+/* The LynxOS target ops object. */
+
+static lynx_process_target the_lynx_target;
+
/* The LynxOS target_ops vector. */
static process_stratum_target lynx_target_ops = {
NULL, /* supports_exec_events */
NULL, /* handle_new_gdb_connection */
NULL, /* handle_monitor_command */
+ NULL, /* core_of_thread */
+ NULL, /* read_loadmap */
+ NULL, /* process_qsupported */
+ NULL, /* supports_tracepoints */
+ NULL, /* read_pc */
+ NULL, /* write_pc */
+ NULL, /* thread_stopped */
+ NULL, /* get_tib_address */
+ NULL, /* pause_all */
+ NULL, /* unpause_all */
+ NULL, /* stabilize_threads */
+ NULL, /* install_fast_tracepoint_jump_pad */
+ NULL, /* emit_ops */
+ NULL, /* supports_disable_randomization */
+ NULL, /* get_min_fast_tracepoint_insn_len */
+ NULL, /* qxfer_libraries_svr4 */
+ NULL, /* support_agent */
+ NULL, /* enable_btrace */
+ NULL, /* disable_btrace */
+ NULL, /* read_btrace */
+ NULL, /* read_btrace_conf */
+ NULL, /* supports_range_stepping */
+ NULL, /* pid_to_exec_file */
+ NULL, /* multifs_open */
+ NULL, /* multifs_unlink */
+ NULL, /* multifs_readlink */
+ NULL, /* breakpoint_kind_from_pc */
+ NULL, /* sw_breakpoint_from_kind */
+ NULL, /* thread_name */
+ NULL, /* breakpoint_kind_from_current_state */
+ NULL, /* supports_software_single_step */
+ NULL, /* supports_catch_syscall */
+ NULL, /* get_ipa_tdesc_idx */
+ NULL, /* thread_handle */
+ &the_lynx_target,
};
void
extern struct lynx_target_ops the_low_target;
+/* Target ops definitions for a LynxOS target. */
+
+class lynx_process_target : public process_target
+{
+public:
+
+};
+
/* The inferior's target description. This is a global because the
LynxOS ports support neither bi-arch nor multi-process. */
extern const struct target_desc *lynx_tdesc;
return the_low_target.breakpoint;
}
+/* The QNX Neutrino target ops object. */
+
+static nto_process_target the_nto_target;
static process_stratum_target nto_target_ops = {
nto_create_inferior,
NULL, /* multifs_readlink */
NULL, /* breakpoint_kind_from_pc */
nto_sw_breakpoint_from_kind,
+ NULL, /* thread_name */
+ NULL, /* breakpoint_kind_from_current_state */
+ NULL, /* supports_software_single_step */
+ NULL, /* supports_catch_syscall */
+ NULL, /* get_ipa_tdesc_idx */
+ NULL, /* thread_handle */
+ &the_nto_target,
};
extern struct nto_target_ops the_low_target;
+/* Target ops definitions for a QNX Neutrino target. */
+
+class nto_process_target : public process_target
+{
+public:
+
+};
+
/* The inferior's target description. This is a global because the
LynxOS ports support neither bi-arch nor multi-process. */
extern const struct target_desc *nto_tdesc;
CORE_ADDR step_range_end; /* Exclusive */
};
+class process_target;
+
/* GDBserver doesn't have a concept of strata like GDB, but we call
its target vector "process_stratum" anyway for the benefit of
shared code. */
false for failure. Return pointer to thread handle via HANDLE
and the handle's length via HANDLE_LEN. */
bool (*thread_handle) (ptid_t ptid, gdb_byte **handle, int *handle_len);
+
+ /* The object that will gradually replace this struct. */
+ process_target *pt;
+};
+
+class process_target
+{
+public:
+
+ virtual ~process_target () = default;
};
extern process_stratum_target *the_target;
return the_low_target.breakpoint;
}
+/* The win32 target ops object. */
+
+static win32_process_target the_win32_target;
+
static process_stratum_target win32_target_ops = {
win32_create_inferior,
NULL, /* post_create_inferior */
NULL, /* multifs_readlink */
NULL, /* breakpoint_kind_from_pc */
win32_sw_breakpoint_from_kind,
+ NULL, /* thread_name */
+ NULL, /* breakpoint_kind_from_current_state */
+ NULL, /* supports_software_single_step */
+ NULL, /* supports_catch_syscall */
+ NULL, /* get_ipa_tdesc_idx */
+ NULL, /* thread_handle */
+ &the_win32_target,
};
/* Initialize the Win32 backend. */
extern struct win32_target_ops the_low_target;
+/* Target ops definitions for a Win32 target. */
+
+class win32_process_target : public process_target
+{
+public:
+
+};
+
/* Retrieve the context for this thread, if not already retrieved. */
extern void win32_require_context (win32_thread_info *th);