import gdb-1999-09-28 snapshot
[deliverable/binutils-gdb.git] / gdb / target.h
index fd4ffe5dc9eb2c4482976598f751737de36bda92..5439fac9da7d92637a016773e8193def398b9904 100644 (file)
@@ -50,7 +50,8 @@ enum strata
     file_stratum,              /* Executable files, etc */
     core_stratum,              /* Core dump files */
     download_stratum,          /* Downloading of remote targets */
-    process_stratum            /* Executing processes */
+    process_stratum,           /* Executing processes */
+    thread_stratum             /* Executing threads */
   };
 
 enum thread_control_capabilities
@@ -219,6 +220,12 @@ enum target_signal
     /* Used internally by Solaris threads.  See signal(5) on Solaris.  */
     TARGET_SIGNAL_CANCEL = 76,
 
+    /* Yes, this pains me, too.  But LynxOS didn't have SIG32, and now
+       Linux does, and we can't disturb the numbering, since it's part
+       of the protocol.  Note that in some GDB's TARGET_SIGNAL_REALTIME_32
+       is number 76.  */
+    TARGET_SIGNAL_REALTIME_32,
+
 #if defined(MACH) || defined(__MACH__)
     /* Mach exceptions */
     TARGET_EXC_BAD_ACCESS,
@@ -390,11 +397,14 @@ struct target_ops
     int to_has_registers;
     int to_has_execution;
     int to_has_thread_control; /* control thread execution */
-    int to_has_async_exec;
     struct section_table
      *to_sections;
     struct section_table
      *to_sections_end;
+    /* ASYNC target controls */
+    int (*to_can_async_p) (void);
+    int (*to_is_async_p) (void);
+    void (*to_async) (void (*cb) (int error, void *context, int fd), void *context);
     int to_magic;
     /* Need sub-structure for target machine related rather than comm related? */
   };
@@ -1002,9 +1012,14 @@ print_section_info PARAMS ((struct target_ops *, bfd *));
 #define target_can_switch_threads \
        (current_target.to_has_thread_control & tc_switch)
 
-/* Does the target support asynchronous execution? */
-#define target_has_async  \
-        (current_target.to_has_async_exec)
+/* Can the target support asynchronous execution? */
+#define target_can_async_p() (current_target.to_can_async_p ())
+
+/* Is the target in asynchronous execution mode? */
+#define target_is_async_p() (current_target.to_is_async_p())
+
+/* Put the target in async mode with the specified callback function. */
+#define target_async(CALLBACK,CONTEXT) (current_target.to_async((CALLBACK), (CONTEXT)))
 
 extern void target_link PARAMS ((char *, CORE_ADDR *));
 
@@ -1259,6 +1274,9 @@ extern struct target_ops *find_run_target PARAMS ((void));
 
 extern struct target_ops *
   find_core_target PARAMS ((void));
+
+int
+target_resize_to_sections PARAMS ((struct target_ops *target, int num_added));
 \f
 /* Stuff that should be shared among the various remote targets.  */
 
This page took 0.023734 seconds and 4 git commands to generate.