/* Target operations for the remote server for GDB.
- Copyright (C) 2002-2021 Free Software Foundation, Inc.
+ Copyright (C) 2002-2022 Free Software Foundation, Inc.
Contributed by MontaVista Software.
/* Return true if target supports debugging agent. */
virtual bool supports_agent ();
- /* Enable branch tracing for PTID based on CONF and allocate a branch trace
+ /* Enable branch tracing for TP based on CONF and allocate a branch trace
target information struct for reading and for disabling branch trace. */
- virtual btrace_target_info *enable_btrace (ptid_t ptid,
+ virtual btrace_target_info *enable_btrace (thread_info *tp,
const btrace_config *conf);
/* Disable branch tracing.
virtual bool thread_handle (ptid_t ptid, gdb_byte **handle,
int *handle_len);
+ /* If THREAD is a fork child that was not reported to GDB, return its parent
+ else nullptr. */
+ virtual thread_info *thread_pending_parent (thread_info *thread);
+
+ /* If THREAD is the parent of a fork child that was not reported to GDB,
+ return this child, else nullptr. */
+ virtual thread_info *thread_pending_child (thread_info *thread);
+
/* Returns true if the target can software single step. */
virtual bool supports_software_single_step ();
the_target->supports_agent ()
static inline struct btrace_target_info *
-target_enable_btrace (ptid_t ptid, const struct btrace_config *conf)
+target_enable_btrace (thread_info *tp, const struct btrace_config *conf)
{
- return the_target->enable_btrace (ptid, conf);
+ return the_target->enable_btrace (tp, conf);
}
static inline int
#define target_thread_handle(ptid, handle, handle_len) \
the_target->thread_handle (ptid, handle, handle_len)
+static inline thread_info *
+target_thread_pending_parent (thread_info *thread)
+{
+ return the_target->thread_pending_parent (thread);
+}
+
+static inline thread_info *
+target_thread_pending_child (thread_info *thread)
+{
+ return the_target->thread_pending_child (thread);
+}
+
int read_inferior_memory (CORE_ADDR memaddr, unsigned char *myaddr, int len);
int set_desired_thread ();
-const char *target_pid_to_str (ptid_t);
+std::string target_pid_to_str (ptid_t);
#endif /* GDBSERVER_TARGET_H */