projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rename common to gdbsupport
[deliverable/binutils-gdb.git]
/
gdb
/
nat
/
linux-procfs.c
diff --git
a/gdb/nat/linux-procfs.c
b/gdb/nat/linux-procfs.c
index 55487507d00cf7b519e36dff86d5abfc2a5dbc46..2afc53d27aae03b2869ffedc37f57eacd79e0e66 100644
(file)
--- a/
gdb/nat/linux-procfs.c
+++ b/
gdb/nat/linux-procfs.c
@@
-1,5
+1,5
@@
/* Linux-specific PROCFS manipulation routines.
/* Linux-specific PROCFS manipulation routines.
- Copyright (C) 2009-201
8
Free Software Foundation, Inc.
+ Copyright (C) 2009-201
9
Free Software Foundation, Inc.
This file is part of GDB.
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/>. */
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 "linux-procfs.h"
-#include "filestuff.h"
+#include "
gdbsupport/
filestuff.h"
#include <dirent.h>
#include <sys/stat.h>
#include <dirent.h>
#include <sys/stat.h>
@@
-239,8
+239,8
@@
linux_proc_tid_get_name (ptid_t ptid)
static char comm_buf[TASK_COMM_LEN];
char comm_path[100];
const char *comm_val;
static char comm_buf[TASK_COMM_LEN];
char comm_path[100];
const char *comm_val;
- pid_t pid = ptid
_get_pid (ptid
);
- pid_t tid = ptid
_lwp_p (ptid) ? ptid_get_lwp (ptid) : ptid_get_pid (ptid
);
+ pid_t pid = ptid
.pid (
);
+ pid_t tid = ptid
.lwp_p () ? ptid.lwp () : ptid.pid (
);
xsnprintf (comm_path, sizeof (comm_path),
"/proc/%ld/task/%ld/comm", (long) pid, (long) tid);
xsnprintf (comm_path, sizeof (comm_path),
"/proc/%ld/task/%ld/comm", (long) pid, (long) tid);
@@
-308,7
+308,7
@@
linux_proc_attach_tgid_threads (pid_t pid,
lwp = strtoul (dp->d_name, NULL, 10);
if (lwp != 0)
{
lwp = strtoul (dp->d_name, NULL, 10);
if (lwp != 0)
{
- ptid_t ptid = ptid_
build
(pid, lwp, 0);
+ ptid_t ptid = ptid_
t
(pid, lwp, 0);
if (attach_lwp (ptid))
new_threads_found = 1;
if (attach_lwp (ptid))
new_threads_found = 1;
@@
-357,3
+357,20
@@
linux_proc_pid_to_exec_file (int pid)
return buf;
}
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.025154 seconds
and
4
git commands to generate.