Fix Python stack corruption
[deliverable/binutils-gdb.git] / gdb / linux-fork.c
index bff807e3ab6d890f2723a6362b4e25c21d9bbefb..cfe1ce555af0aac8ce8952bdd2f5dbe76618ce73 100644 (file)
@@ -1,6 +1,6 @@
 /* GNU/Linux native-dependent code for debugging multiple forks.
 
-   Copyright (C) 2005-2013 Free Software Foundation, Inc.
+   Copyright (C) 2005-2014 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -25,7 +25,7 @@
 #include "infcall.h"
 #include "objfiles.h"
 #include "gdb_assert.h"
-#include "gdb_string.h"
+#include <string.h>
 #include "linux-fork.h"
 #include "linux-nat.h"
 #include "gdbthread.h"
@@ -33,7 +33,7 @@
 
 #include <sys/ptrace.h>
 #include "gdb_wait.h"
-#include "gdb_dirent.h"
+#include <dirent.h>
 #include <ctype.h>
 
 struct fork_info *fork_list;
@@ -81,7 +81,7 @@ add_fork (pid_t pid)
       add_fork (ptid_get_pid (inferior_ptid)); /* safe recursion */
     }
 
-  fp = XZALLOC (struct fork_info);
+  fp = XCNEW (struct fork_info);
   fp->ptid = ptid_build (pid, pid, 0);
   fp->num = ++highest_fork_num;
   fp->next = fork_list;
@@ -387,7 +387,7 @@ linux_fork_mourn_inferior (void)
    the first available.  */
 
 void
-linux_fork_detach (char *args, int from_tty)
+linux_fork_detach (const char *args, int from_tty)
 {
   /* OK, inferior_ptid is the one we are detaching from.  We need to
      delete it from the fork_list, and switch to the next available
This page took 0.027235 seconds and 4 git commands to generate.