-/* Copyright (C) 1986-2019 Free Software Foundation, Inc.
+/* Copyright (C) 1986-2020 Free Software Foundation, Inc.
This file is part of GDB.
struct frame_info;
struct address_space;
struct return_value_info;
+struct process_stratum_target;
/* True if we are debugging run control. */
extern unsigned int debug_infrun;
resumed. */
extern ptid_t user_visible_resume_ptid (int step);
-extern void wait_for_inferior (void);
+/* Return the process_stratum target that we will proceed, in the
+ perspective of the user/frontend. If RESUME_PTID is
+ MINUS_ONE_PTID, then we'll resume all threads of all targets, so
+ the function returns NULL. Otherwise, we'll be resuming a process
+ or thread of the current process, so we return the current
+ inferior's process stratum target. */
+extern process_stratum_target *user_visible_resume_target (ptid_t resume_ptid);
/* Return control to GDB when the inferior stops for real. Print
appropriate messages, remove breakpoints, give terminal our modes,
target, false otherwise. */
extern int normal_stop (void);
-extern void get_last_target_status (ptid_t *ptid,
+/* Return the cached copy of the last target/ptid/waitstatus returned
+ by target_wait()/deprecated_target_wait_hook(). The data is
+ actually cached by handle_inferior_event(), which gets called
+ immediately after target_wait()/deprecated_target_wait_hook(). */
+extern void get_last_target_status (process_stratum_target **target,
+ ptid_t *ptid,
struct target_waitstatus *status);
-extern void set_last_target_status (ptid_t ptid,
+/* Set the cached copy of the last target/ptid/waitstatus. */
+extern void set_last_target_status (process_stratum_target *target, ptid_t ptid,
struct target_waitstatus status);
+/* Clear the cached copy of the last ptid/waitstatus returned by
+ target_wait(). */
+extern void nullify_last_target_wait_ptid ();
+
/* Stop all threads. Only returns after everything is halted. */
extern void stop_all_threads (void);