aboutsummaryrefslogtreecommitdiff
path: root/gdb/procfs.c
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2004-08-08 01:00:55 +0000
committerMark Kettenis <kettenis@gnu.org>2004-08-08 01:00:55 +0000
commit5240ceac287986a93aac3e90744d9f32744d487f (patch)
tree133e71ba8b941e99397881ce26e94e4a67988fac /gdb/procfs.c
parentf6428d73844468b4899704dad4984d0959f87857 (diff)
downloadgdb-5240ceac287986a93aac3e90744d9f32744d487f.zip
gdb-5240ceac287986a93aac3e90744d9f32744d487f.tar.gz
gdb-5240ceac287986a93aac3e90744d9f32744d487f.tar.bz2
* procfs.c (procfs_pid_to_str): Remove redundant and unused
variables. Incapitalized "process".
Diffstat (limited to 'gdb/procfs.c')
-rw-r--r--gdb/procfs.c22
1 files changed, 6 insertions, 16 deletions
diff --git a/gdb/procfs.c b/gdb/procfs.c
index 672b5ac..19d7ae3 100644
--- a/gdb/procfs.c
+++ b/gdb/procfs.c
@@ -5122,29 +5122,19 @@ procfs_thread_alive (ptid_t ptid)
return 1;
}
-/*
- * Function: target_pid_to_str
- *
- * Return a string to be used to identify the thread in
- * the "info threads" display.
- */
+/* Convert PTID to a string. Returns the string in a static buffer. */
char *
procfs_pid_to_str (ptid_t ptid)
{
static char buf[80];
- int proc, thread;
- procinfo *pi;
- proc = PIDGET (ptid);
- thread = TIDGET (ptid);
- pi = find_procinfo (proc, thread);
-
- if (thread == 0)
- sprintf (buf, "Process %d", proc);
+ if (TIDGET (ptid) == 0)
+ sprintf (buf, "process %d", PIDGET (ptid));
else
- sprintf (buf, "LWP %d", thread);
- return &buf[0];
+ sprintf (buf, "LWP %d", TIDGET (ptid));
+
+ return buf;
}
/*