summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <dvlasenk@redhat.com>2008-12-23 16:14:42 +0000
committerDenys Vlasenko <dvlasenk@redhat.com>2008-12-23 16:14:42 +0000
commitb1efe53531c2f0f3fd2a4fc8a56220737539c44e (patch)
treef2db1199d4a2824224eaa2c23a0a2c3abeeca3f8
parent1e3ce32a4fadb58230bca4f16baf8152579dd3d0 (diff)
downloadstrace-b1efe53531c2f0f3fd2a4fc8a56220737539c44e.tar.gz
strace-b1efe53531c2f0f3fd2a4fc8a56220737539c44e.tar.bz2
strace-b1efe53531c2f0f3fd2a4fc8a56220737539c44e.tar.xz
Fix build breakage from my previous commit.
Now I test for PT_SETOPTIONS being #defined. Remove trailing whitespace. No actual code changes.
-rw-r--r--desc.c2
-rw-r--r--strace.c6
-rw-r--r--svr4/syscallent.h2
-rw-r--r--test/childthread.c2
-rw-r--r--test/leaderkill.c2
5 files changed, 8 insertions, 6 deletions
diff --git a/desc.c b/desc.c
index 379950b..2b0cd53 100644
--- a/desc.c
+++ b/desc.c
@@ -834,7 +834,7 @@ struct tcb *tcp;
tprintf("{%p, %p, %ld, %ld}",
event.data, event.obj,
event.res, event.res2);
- else
+ else
#endif
tprintf("{...}");
}
diff --git a/strace.c b/strace.c
index 5f50760..4783453 100644
--- a/strace.c
+++ b/strace.c
@@ -2408,7 +2408,9 @@ Process %d attached (waiting for parent)\n",
return -1;
}
}
-#ifdef LINUX /* add more OSes after you verified it works for them */
+/* PTRACE_SETOPTIONS is not a #define. PT_SETOPTIONS is. */
+/* Add more OSes after you verified it works for them. */
+#if defined LINUX && defined PT_SETOPTIONS
/*
* Ask kernel to set signo to SIGTRAP | 0x80
* on ptrace-generated SIGTRAPs, and mark
@@ -2423,7 +2425,7 @@ Process %d attached (waiting for parent)\n",
goto tracing;
}
-#ifdef LINUX
+#if defined LINUX && defined PT_SETOPTIONS
if (tcp->sigtrap80 != SIGTRAP && WSTOPSIG(status) == SIGTRAP) {
/*
* We told ptrace to report SIGTRAP | 0x80 on this process
diff --git a/svr4/syscallent.h b/svr4/syscallent.h
index 239d6b0..d8e5a12 100644
--- a/svr4/syscallent.h
+++ b/svr4/syscallent.h
@@ -823,5 +823,5 @@
{ -1, TF, sys_aioaread64, "aioaread64" }, /* 417 */
{ -1, TF, sys_aioawrite64, "aioawrite64" }, /* 418 */
{ -1, TF, sys_aiocancel64, "aiocancel64" }, /* 419 */
- { -1, TF, sys_aiofsync, "aiofsync" }, /* 420 */
+ { -1, TF, sys_aiofsync, "aiofsync" }, /* 420 */
#endif
diff --git a/test/childthread.c b/test/childthread.c
index bc10d3a..bd0174b 100644
--- a/test/childthread.c
+++ b/test/childthread.c
@@ -1,7 +1,7 @@
/* Test exit of a child of a TCB_EXITING child where the toplevel process starts
* waiting on it. The middle one gets detached and strace must update the
* toplevel process'es number of attached children to 0.
- *
+ *
* gcc -o test/childthread test/childthread.c -Wall -ggdb2 -pthread;./strace -f ./test/childthread
* It must print: write(1, "OK\n", ...
*/
diff --git a/test/leaderkill.c b/test/leaderkill.c
index a5b27a5..18d6e12 100644
--- a/test/leaderkill.c
+++ b/test/leaderkill.c
@@ -1,7 +1,7 @@
/* Test handle_group_exit () handling of a thread leader still alive with its
* thread child calling exit_group () and proper passing of the process exit
* code to the process parent of this whole thread group.
- *
+ *
* gcc -o test/leaderkill test/leaderkill.c -Wall -ggdb2 -pthread;./test/leaderkill & pid=$!;sleep 1;strace -o x -q ./strace -f -p $pid
* It must print: write(1, "OK\n", ...
*/