Make get_image_name static
[deliverable/binutils-gdb.git] / gdb / nat / linux-procfs.c
index 1c236c543d9e5c1935db96bee590e448641e682f..25d36c10efc29b05e01836bf35bad71742ab9d60 100644 (file)
@@ -1,5 +1,5 @@
 /* Linux-specific PROCFS manipulation routines.
-   Copyright (C) 2009-2018 Free Software Foundation, Inc.
+   Copyright (C) 2009-2021 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -16,9 +16,9 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 
-#include "common-defs.h"
+#include "gdbsupport/common-defs.h"
 #include "linux-procfs.h"
-#include "filestuff.h"
+#include "gdbsupport/filestuff.h"
 #include <dirent.h>
 #include <sys/stat.h>
 
@@ -357,3 +357,20 @@ linux_proc_pid_to_exec_file (int pid)
 
   return buf;
 }
+
+/* See linux-procfs.h.  */
+
+void
+linux_proc_init_warnings ()
+{
+  static bool warned = false;
+
+  if (warned)
+    return;
+  warned = true;
+
+  struct stat st;
+
+  if (stat ("/proc/self", &st) != 0)
+    warning (_("/proc is not accessible."));
+}
This page took 0.024642 seconds and 4 git commands to generate.