Remove target_has_execution macro
[deliverable/binutils-gdb.git] / gdb / linux-fork.c
index 284f1985d0dcb9ee9f98412bdc920cbcf27a5610..b3d8fc1a1746e5fc7ea3a3ff7ee177f3b1b0c3c3 100644 (file)
@@ -61,8 +61,8 @@ struct fork_info
 
     if (savedregs)
       delete savedregs;
-    if (filepos)
-      xfree (filepos);
+
+    xfree (filepos);
   }
 
   ptid_t ptid = null_ptid;
@@ -110,8 +110,7 @@ find_last_fork (void)
 static bool
 one_fork_p ()
 {
-  return (!fork_list.empty ()
-         && &fork_list.front () == &fork_list.back ());
+  return fork_list.size () == 1;
 }
 
 /* Add a new fork to the internal fork list.  */
@@ -646,7 +645,7 @@ checkpoint_command (const char *args, int from_tty)
   struct fork_info *fp;
   pid_t retpid;
 
-  if (!target_has_execution) 
+  if (!target_has_execution ()
     error (_("The program is not being run."));
 
   /* Ensure that the inferior is not multithreaded.  */
@@ -664,7 +663,7 @@ checkpoint_command (const char *args, int from_tty)
   if (!fork_fn)
     error (_("checkpoint: can't find fork function in inferior."));
 
-  gdbarch = get_objfile_arch (fork_objf);
+  gdbarch = fork_objf->arch ();
   ret = value_from_longest (builtin_type (gdbarch)->builtin_int, 0);
 
   /* Tell linux-nat.c that we're checkpointing this inferior.  */
This page took 0.024323 seconds and 4 git commands to generate.