aboutsummaryrefslogtreecommitdiff
path: root/gdb/nat/linux-procfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/nat/linux-procfs.c')
-rw-r--r--gdb/nat/linux-procfs.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/gdb/nat/linux-procfs.c b/gdb/nat/linux-procfs.c
index 1c236c5..6c15ea5 100644
--- a/gdb/nat/linux-procfs.c
+++ b/gdb/nat/linux-procfs.c
@@ -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."));
+}