Rename common to gdbsupport
[deliverable/binutils-gdb.git] / gdb / target / waitstatus.h
index cafbf15e6e6732c85ef0f63bc28cda2183fc0942..ec1abed7b4030587a88f4f51d1731fd777cf0b17 100644 (file)
@@ -1,6 +1,6 @@
 /* Target waitstatus definitions and prototypes.
 
-   Copyright (C) 1990-2013 Free Software Foundation, Inc.
+   Copyright (C) 1990-2019 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-#ifndef WAITSTATUS_H
-#define WAITSTATUS_H
+#ifndef TARGET_WAITSTATUS_H
+#define TARGET_WAITSTATUS_H
 
-#include "common-utils.h"
-#include "ptid.h"
-#include "gdb_signals.h"
+#include "gdbsupport/gdb_signals.h"
 
 /* Stuff for target_wait.  */
 
@@ -85,7 +83,7 @@ enum target_waitkind
      to the console, for instance.  In this case, we want to go back
      to the event loop and wait there for another event from the
      inferior, rather than being stuck in the remote_async_wait()
-     function. sThis way the event loop is responsive to other events,
+     function.  This way the event loop is responsive to other events,
      like for instance the user typing.  */
   TARGET_WAITKIND_IGNORE,
  
@@ -94,7 +92,13 @@ enum target_waitkind
   TARGET_WAITKIND_NO_HISTORY,
  
   /* There are no resumed children left in the program.  */
-  TARGET_WAITKIND_NO_RESUMED
+  TARGET_WAITKIND_NO_RESUMED,
+
+  /* The thread was created.  */
+  TARGET_WAITKIND_THREAD_CREATED,
+
+  /* The thread has exited.  The exit status is in value.integer.  */
+  TARGET_WAITKIND_THREAD_EXITED,
 };
 
 struct target_waitstatus
@@ -117,10 +121,31 @@ struct target_waitstatus
     } value;
 };
 
+/* Extended reasons that can explain why a target/thread stopped for a
+   trap signal.  */
+
+enum target_stop_reason
+{
+  /* Either not stopped, or stopped for a reason that doesn't require
+     special tracking.  */
+  TARGET_STOPPED_BY_NO_REASON,
+
+  /* Stopped by a software breakpoint.  */
+  TARGET_STOPPED_BY_SW_BREAKPOINT,
+
+  /* Stopped by a hardware breakpoint.  */
+  TARGET_STOPPED_BY_HW_BREAKPOINT,
+
+  /* Stopped by a watchpoint.  */
+  TARGET_STOPPED_BY_WATCHPOINT,
+
+  /* Stopped by a single step finishing.  */
+  TARGET_STOPPED_BY_SINGLE_STEP
+};
+
 /* Prototypes */
 
-/* Return a pretty printed form of target_waitstatus.
-   Space for the result is malloc'd, caller must free.  */
-extern char *target_waitstatus_to_string (const struct target_waitstatus *);
+/* Return a pretty printed form of target_waitstatus.  */
+std::string target_waitstatus_to_string (const struct target_waitstatus *);
 
-#endif /* WAITSTATUS_H */
+#endif /* TARGET_WAITSTATUS_H */
This page took 0.025606 seconds and 4 git commands to generate.