Make mapped_debug_names independent of objfile
[deliverable/binutils-gdb.git] / gdb / infrun.h
index 2b2a3a3e44462ac826d5af17acf869d406a5dbbd..980854135197c7fd2c66a0c8b40e5746ec10aa2d 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1986-2019 Free Software Foundation, Inc.
+/* Copyright (C) 1986-2020 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -25,6 +25,8 @@ struct target_waitstatus;
 struct frame_info;
 struct address_space;
 struct return_value_info;
+struct process_stratum_target;
+struct thread_info;
 
 /* True if we are debugging run control.  */
 extern unsigned int debug_infrun;
@@ -93,7 +95,13 @@ extern void proceed (CORE_ADDR, enum gdb_signal);
    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,
@@ -101,12 +109,22 @@ extern void wait_for_inferior (void);
    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);
 
@@ -133,7 +151,9 @@ extern int thread_is_stepping_over_breakpoint (int thread);
    triggers a non-steppable watchpoint.  */
 extern int stepping_past_nonsteppable_watchpoint (void);
 
-extern void set_step_info (struct frame_info *frame,
+/* Record in TP the frame and location we're currently stepping through.  */
+extern void set_step_info (thread_info *tp,
+                          struct frame_info *frame,
                           struct symtab_and_line sal);
 
 /* Several print_*_reason helper functions to print why the inferior
@@ -248,6 +268,8 @@ struct displaced_step_closure
   virtual ~displaced_step_closure () = 0;
 };
 
+using displaced_step_closure_up = std::unique_ptr<displaced_step_closure>;
+
 /* A simple displaced step closure that contains only a byte buffer.  */
 
 struct buf_displaced_step_closure : displaced_step_closure
@@ -273,7 +295,7 @@ struct displaced_step_inferior_state
     failed_before = 0;
     step_thread = nullptr;
     step_gdbarch = nullptr;
-    step_closure = nullptr;
+    step_closure.reset ();
     step_original = 0;
     step_copy = 0;
     step_saved_copy.clear ();
@@ -293,7 +315,7 @@ struct displaced_step_inferior_state
 
   /* The closure provided gdbarch_displaced_step_copy_insn, to be used
      for post-step cleanup.  */
-  displaced_step_closure *step_closure;
+  displaced_step_closure_up step_closure;
 
   /* The address of the original instruction, and the copy we
      made.  */
This page took 0.025917 seconds and 4 git commands to generate.