summaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@specifix.com>2000-03-17 19:50:29 +0000
committerMichael Snyder <msnyder@specifix.com>2000-03-17 19:50:29 +0000
commit33fb4442cd7c78909107b7f24c89d718b0034248 (patch)
tree1baa4057183821ce094a3a220af59b269eed2558 /gdb
parentc9e24369e4d4709d5fdc133680b21a708503dfaa (diff)
downloadgdb-33fb4442cd7c78909107b7f24c89d718b0034248.tar.gz
2000-03-17 Mark Kettenis <kettenis@gnu.org>
* gdb_wait.h: add definitions of WSETSTOP and WSETEXIT for Linux. * linux-thread.c: Use WSETSTOP instead of W_STOPCODE.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/gdb_wait.h8
-rw-r--r--gdb/linux-thread.c6
3 files changed, 16 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 14599a22553..48de97b8890 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2000-03-17 Mark Kettenis <kettenis@gnu.org>
+
+ * gdb_wait.h: add definitions of WSETSTOP and WSETEXIT for Linux.
+ * linux-thread.c: Use WSETSTOP instead of W_STOPCODE.
+
Fri Mar 17 11:06:59 2000 Philippe De Muyter <phdm@macqel.be>
* language.c (set_lang_str): Do not call `free' for a null pointer.
diff --git a/gdb/gdb_wait.h b/gdb/gdb_wait.h
index d0f94f30c4a..36e797b2223 100644
--- a/gdb/gdb_wait.h
+++ b/gdb/gdb_wait.h
@@ -86,11 +86,19 @@
#endif
#ifndef WSETEXIT
+# ifdef W_EXITCODE
+#define WSETEXIT(w,status) ((w) = W_EXITCODE(status,0))
+# else
#define WSETEXIT(w,status) ((w) = (0 | ((status) << 8)))
+# endif
#endif
#ifndef WSETSTOP
+# ifdef W_STOPCODE
+#define WSETSTOP(w,status) ((w) = W_STOPCODE(status,0))
+# else
#define WSETSTOP(w,sig) ((w) = (0177 | ((sig) << 8)))
+# endif
#endif
/*
diff --git a/gdb/linux-thread.c b/gdb/linux-thread.c
index dc91edf6a1c..5539e2ef9f0 100644
--- a/gdb/linux-thread.c
+++ b/gdb/linux-thread.c
@@ -1129,7 +1129,7 @@ linuxthreads_attach (args, from_tty)
linuxthreads_breakpoints_inserted = 1;
linuxthreads_breakpoint_last = -1;
linuxthreads_wait_last = -1;
- linuxthreads_exit_status = __W_STOPCODE(0);
+ WSETSTOP (linux_exit_status, 0);
child_ops.to_attach (args, from_tty);
@@ -1189,7 +1189,7 @@ linuxthreads_detach (args, from_tty)
linuxthreads_find_trap (inferior_pid, 1);
linuxthreads_wait_last = -1;
- linuxthreads_exit_status = __W_STOPCODE(0);
+ WSETSTOP (linux_exit_status, 0);
}
linuxthreads_inferior_pid = 0;
@@ -1601,7 +1601,7 @@ Use the \"file\" or \"exec-file\" command.");
linuxthreads_breakpoints_inserted = 1;
linuxthreads_breakpoint_last = -1;
linuxthreads_wait_last = -1;
- linuxthreads_exit_status = __W_STOPCODE(0);
+ WSETSTOP (linux_exit_status, 0);
if (linuxthreads_max)
linuxthreads_attach_pending = 1;