Allow integer immediate for VFP vmov instructions.
[deliverable/binutils-gdb.git] / gdb / inf-child.c
index 7b2f2a25a2758f7d58f4652764d2cbaad868e01f..2f5babebce7fea9b15a89df126625192fd183e12 100644 (file)
 #include <fcntl.h>
 #include <unistd.h>
 
+static const target_info inf_child_target_info = {
+  "native",
+  N_("Native process"),
+  N_("Native process (started by the \"run\" command).")
+};
+
+const target_info &
+inf_child_target::info () const
+{
+  return inf_child_target_info;
+}
+
 /* Helper function for child_wait and the derivatives of child_wait.
    HOSTSTATUS is the waitstatus from wait() or the equivalent; store our
    translation of that in OURSTATUS.  */
@@ -139,9 +151,14 @@ static int inf_child_explicitly_opened;
 /* See inf-child.h.  */
 
 void
-inf_child_open_target (struct target_ops *target, const char *arg,
-                      int from_tty)
+inf_child_open_target (const char *arg, int from_tty)
 {
+  target_ops *target = get_native_target ();
+
+  /* There's always only ever one native target, and if we get here,
+     it better be an inf-child target.  */
+  gdb_assert (dynamic_cast<inf_child_target *> (target) != NULL);
+
   target_preopen (from_tty);
   push_target (target);
   inf_child_explicitly_opened = 1;
@@ -149,12 +166,6 @@ inf_child_open_target (struct target_ops *target, const char *arg,
     printf_filtered ("Done.  Use the \"run\" command to start a process.\n");
 }
 
-void
-inf_child_target::open (const char *arg, int from_tty)
-{
-  inf_child_open_target (this, arg, from_tty);
-}
-
 /* Implement the to_disconnect target_ops method.  */
 
 void
@@ -200,10 +211,10 @@ inf_child_target::post_startup_inferior (ptid_t ptid)
      operation by a debugger.  */
 }
 
-int
+bool
 inf_child_target::can_run ()
 {
-  return 1;
+  return true;
 }
 
 bool
@@ -226,31 +237,31 @@ inf_child_target::pid_to_exec_file (int pid)
   return NULL;
 }
 
-int
+bool
 inf_child_target::has_all_memory ()
 {
   return default_child_has_all_memory ();
 }
 
-int
+bool
 inf_child_target::has_memory ()
 {
   return default_child_has_memory ();
 }
 
-int
+bool
 inf_child_target::has_stack ()
 {
   return default_child_has_stack ();
 }
 
-int
+bool
 inf_child_target::has_registers ()
 {
   return default_child_has_registers ();
 }
 
-int
+bool
 inf_child_target::has_execution (ptid_t ptid)
 {
   return default_child_has_execution (ptid);
@@ -404,19 +415,19 @@ inf_child_target::fileio_readlink (struct inferior *inf, const char *filename,
 #endif
 }
 
-int
-inf_child_target::use_agent (int use)
+bool
+inf_child_target::use_agent (bool use)
 {
   if (agent_loaded_p ())
     {
       ::use_agent = use;
-      return 1;
+      return true;
     }
   else
-    return 0;
+    return false;
 }
 
-int
+bool
 inf_child_target::can_use_agent ()
 {
   return agent_loaded_p ();
@@ -426,3 +437,12 @@ inf_child_target::inf_child_target ()
 {
   this->to_stratum = process_stratum;
 }
+
+/* See inf-child.h.  */
+
+void
+add_inf_child_target (inf_child_target *target)
+{
+  set_native_target (target);
+  add_target (inf_child_target_info, inf_child_open_target);
+}
This page took 0.033811 seconds and 4 git commands to generate.