diff options
author | Gary Benson <gbenson@redhat.com> | 2015-06-10 14:28:43 +0100 |
---|---|---|
committer | Gary Benson <gbenson@redhat.com> | 2015-06-10 14:28:43 +0100 |
commit | 9bc3a9760b22a6187fdce6abc3df8f0c1d483a21 (patch) | |
tree | 0d3c633fdf088c2e5f4af7c10a3d2da02bbc21ed /gdb/nat | |
parent | 4b8b5e72451d5b9da4000b8346b20035833aa087 (diff) | |
download | gdb-9bc3a9760b22a6187fdce6abc3df8f0c1d483a21.zip gdb-9bc3a9760b22a6187fdce6abc3df8f0c1d483a21.tar.gz gdb-9bc3a9760b22a6187fdce6abc3df8f0c1d483a21.tar.bz2 |
Remove linux_proc_pid_get_ns
This commit removes linux_proc_pid_get_ns, and updates its only
caller to use linux_ns_same instead.
gdb/ChangeLog:
* linux-thread-db.c (nat/linux-namespaces.h): New include.
(check_pid_namespace_match): Use linux_ns_same rather than
linux_proc_pid_get_ns to spot PID namespace mismatches.
* nat/linux-procfs.h (linux_proc_pid_get_ns): Remove.
* nat/linux-procfs.c (linux_proc_pid_get_ns): Likewise.
Diffstat (limited to 'gdb/nat')
-rw-r--r-- | gdb/nat/linux-procfs.c | 19 | ||||
-rw-r--r-- | gdb/nat/linux-procfs.h | 6 |
2 files changed, 0 insertions, 25 deletions
diff --git a/gdb/nat/linux-procfs.c b/gdb/nat/linux-procfs.c index 44364c5..24bcb01 100644 --- a/gdb/nat/linux-procfs.c +++ b/gdb/nat/linux-procfs.c @@ -185,25 +185,6 @@ linux_proc_pid_is_zombie (pid_t pid) return linux_proc_pid_is_zombie_maybe_warn (pid, 1); } -/* See linux-procfs.h declaration. */ - -char * -linux_proc_pid_get_ns (pid_t pid, const char *ns) -{ - char buf[100]; - char nsval[64]; - int ret; - xsnprintf (buf, sizeof (buf), "/proc/%d/ns/%s", (int) pid, ns); - ret = readlink (buf, nsval, sizeof (nsval)); - if (0 < ret && ret < sizeof (nsval)) - { - nsval[ret] = '\0'; - return xstrdup (nsval); - } - - return NULL; -} - /* See linux-procfs.h. */ void diff --git a/gdb/nat/linux-procfs.h b/gdb/nat/linux-procfs.h index fdbf383..f9cad39 100644 --- a/gdb/nat/linux-procfs.h +++ b/gdb/nat/linux-procfs.h @@ -54,12 +54,6 @@ extern int linux_proc_pid_is_zombie_nowarn (pid_t pid); extern int linux_proc_pid_is_gone (pid_t pid); -/* Return an opaque string identifying PID's NS namespace or NULL if - * the information is unavailable. The returned string must be - * released with xfree. */ - -extern char *linux_proc_pid_get_ns (pid_t pid, const char *ns); - /* Callback function for linux_proc_attach_tgid_threads. If the PTID thread is not yet known, try to attach to it and return true, otherwise return false. */ |