Replace clear_hook_in_cleanup with scoped_restore_hook_in
[deliverable/binutils-gdb.git] / gdb / linux-fork.c
index e4be59352a5fd8cb944a28f5c49994a2f5672b88..22a11c6529bfa16313c403fa4e76f517c538d1ab 100644 (file)
@@ -1,6 +1,6 @@
 /* GNU/Linux native-dependent code for debugging multiple forks.
 
-   Copyright (C) 2005-2016 Free Software Foundation, Inc.
+   Copyright (C) 2005-2017 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -38,9 +38,6 @@
 struct fork_info *fork_list;
 static int highest_fork_num;
 
-/* Prevent warning from -Wmissing-prototypes.  */
-extern void _initialize_linux_fork (void);
-
 /* Fork list data structure:  */
 struct fork_info
 {
@@ -248,7 +245,7 @@ call_lseek (int fd, off_t offset, int whence)
 {
   char exp[80];
 
-  snprintf (&exp[0], sizeof (exp), "lseek (%d, %ld, %d)",
+  snprintf (&exp[0], sizeof (exp), "(long) lseek (%d, %ld, %d)",
            fd, (long) offset, whence);
   return (off_t) parse_and_eval_long (&exp[0]);
 }
@@ -492,7 +489,7 @@ inferior_call_waitpid (ptid_t pptid, int pid)
   argv[2] = value_from_longest (builtin_type (gdbarch)->builtin_int, 0);
   argv[3] = 0;
 
-  retv = call_function_by_hand (waitpid_fn, 3, argv);
+  retv = call_function_by_hand (waitpid_fn, NULL, 3, argv);
   if (value_as_long (retv) < 0)
     goto out;
 
@@ -707,7 +704,7 @@ checkpoint_command (char *args, int from_tty)
     scoped_restore save_pid
       = make_scoped_restore (&checkpointing_pid, ptid_get_pid (inferior_ptid));
 
-    ret = call_function_by_hand (fork_fn, 0, &ret);
+    ret = call_function_by_hand (fork_fn, NULL, 0, &ret);
   }
 
   if (!ret)    /* Probably can't happen.  */
This page took 0.024277 seconds and 4 git commands to generate.