*** empty log message ***
[deliverable/binutils-gdb.git] / gdb / inferior.h
index 9949136738ecd2d5758109c8f5bf9bf5674c2a15..cfaea7f0d003c1eaaba5e1045f0edeb977dbee0e 100644 (file)
@@ -32,6 +32,8 @@ struct regcache;
 struct ui_out;
 struct terminal_info;
 
+#include "ptid.h"
+
 /* For bpstat.  */
 #include "breakpoint.h"
 
@@ -63,36 +65,6 @@ extern void discard_infcall_control_state (struct infcall_control_state *);
 extern struct regcache *
   get_infcall_suspend_state_regcache (struct infcall_suspend_state *);
 
-/* The -1 ptid, often used to indicate either an error condition
-   or a "don't care" condition, i.e, "run all threads."  */
-extern ptid_t minus_one_ptid;
-
-/* The null or zero ptid, often used to indicate no process.  */
-extern ptid_t null_ptid;
-
-/* Attempt to find and return an existing ptid with the given PID, LWP,
-   and TID components.  If none exists, create a new one and return
-   that.  */
-ptid_t ptid_build (int pid, long lwp, long tid);
-
-/* Find/Create a ptid from just a pid.  */
-ptid_t pid_to_ptid (int pid);
-
-/* Fetch the pid (process id) component from a ptid.  */
-int ptid_get_pid (ptid_t ptid);
-
-/* Fetch the lwp (lightweight process) component from a ptid.  */
-long ptid_get_lwp (ptid_t ptid);
-
-/* Fetch the tid (thread id) component from a ptid.  */
-long ptid_get_tid (ptid_t ptid);
-
-/* Compare two ptids to see if they are equal.  */
-extern int ptid_equal (ptid_t p1, ptid_t p2);
-
-/* Return true if PTID represents a process id.  */
-extern int ptid_is_pid (ptid_t ptid);
-
 /* Returns true if PTID matches filter FILTER.  FILTER can be the wild
    card MINUS_ONE_PTID (all ptid match it); can be a ptid representing
    a process (ptid_is_pid returns true), in which case, all lwps and
@@ -152,6 +124,10 @@ extern int non_stop;
    detached depends on 'set follow-fork-mode' setting.  */
 extern int detach_fork;
 
+/* When set (default), the target should attempt to disable the operating
+   system's address space randomization feature when starting an inferior.  */
+extern int disable_randomization;
+
 extern void generic_mourn_inferior (void);
 
 extern void terminal_save_ours (void);
@@ -217,7 +193,9 @@ extern void terminal_init_inferior_with_pgrp (int pgrp);
 
 extern int fork_inferior (char *, char *, char **,
                          void (*)(void),
-                         void (*)(int), void (*)(void), char *);
+                         void (*)(int), void (*)(void), char *,
+                          void (*)(const char *,
+                                   char * const *, char * const *));
 
 
 extern void startup_inferior (int);
@@ -352,8 +330,7 @@ enum stop_kind
 enum exec_direction_kind
   {
     EXEC_FORWARD,
-    EXEC_REVERSE,
-    EXEC_ERROR
+    EXEC_REVERSE
   };
 
 /* The current execution direction.  This should only be set to enum
@@ -518,6 +495,11 @@ struct inferior
   /* Private data used by the target vector implementation.  */
   struct private_inferior *private;
 
+  /* HAS_EXIT_CODE is true if the inferior exited with an exit code.
+     In this case, the EXIT_CODE field is also valid.  */
+  int has_exit_code;
+  LONGEST exit_code;
+
   /* We keep a count of the number of times the user has requested a
      particular syscall to be tracked, and pass this information to the
      target.  This lets capable targets implement filtering directly.  */
@@ -639,6 +621,11 @@ extern void set_current_inferior (struct inferior *);
 
 extern struct cleanup *save_current_inferior (void);
 
+/* Traverse all inferiors.  */
+
+#define ALL_INFERIORS(I) \
+  for ((I) = inferior_list; (I); (I) = (I)->next)
+
 extern struct inferior *inferior_list;
 
 /* Prune away automatically added inferiors that aren't required
This page took 0.025665 seconds and 4 git commands to generate.