aboutsummaryrefslogtreecommitdiff
path: root/gdb/procfs.c
diff options
context:
space:
mode:
authorStu Grossman <grossman@cygnus>1996-05-15 01:09:57 +0000
committerStu Grossman <grossman@cygnus>1996-05-15 01:09:57 +0000
commit9b33e492d6327edb62715d91c9ed22e6d5347ab8 (patch)
tree90bbec038d2718a2124dbb5f0cd797be788a2636 /gdb/procfs.c
parentff60fc3aec91ce8505e9e450df932c44149fb7a6 (diff)
downloadgdb-9b33e492d6327edb62715d91c9ed22e6d5347ab8.zip
gdb-9b33e492d6327edb62715d91c9ed22e6d5347ab8.tar.gz
gdb-9b33e492d6327edb62715d91c9ed22e6d5347ab8.tar.bz2
* procfs.c (procfs_thread_alive procfs_stop): Make static.
* (procfs_pid_to_str): New routine to print out thread id's in an intelligible manner. * sol-thread.c (sol_thread_fetch_registers): Re-order manner in which supply_register is called to fix bug with writing writing individual regs. * config/sparc/tm-sun4sol2.h: Define default for target_pid_to_str in case host lacks libthread_db.
Diffstat (limited to 'gdb/procfs.c')
-rw-r--r--gdb/procfs.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/gdb/procfs.c b/gdb/procfs.c
index 08cbb45..eceb8ba 100644
--- a/gdb/procfs.c
+++ b/gdb/procfs.c
@@ -4386,7 +4386,7 @@ procfs_stopped_by_watchpoint(pid)
/* Why is this necessary? Shouldn't dead threads just be removed from the
thread database? */
-int
+static int
procfs_thread_alive (pid)
int pid;
{
@@ -4399,14 +4399,28 @@ procfs_thread_alive (pid)
XXX - This may not be correct for all systems. Some may want to use
killpg() instead of kill (-pgrp). */
-void
+static void
procfs_stop ()
{
extern pid_t inferior_process_group;
kill (-inferior_process_group, SIGINT);
}
+
+/* Convert a pid to printable form. */
+#ifdef TIDGET
+char *
+procfs_pid_to_str (pid)
+ int pid;
+{
+ static char buf[100];
+
+ sprintf (buf, "Kernel thread %d", TIDGET (pid));
+
+ return buf;
+}
+#endif /* TIDGET */
struct target_ops procfs_ops = {
"procfs", /* to_shortname */