]> granicus.if.org Git - strace/commitdiff
Cleanups. No logic changes.
authorDenys Vlasenko <dvlasenk@redhat.com>
Tue, 18 Jun 2013 16:09:39 +0000 (18:09 +0200)
committerDenys Vlasenko <dvlasenk@redhat.com>
Tue, 18 Jun 2013 16:15:51 +0000 (18:15 +0200)
* defs.h: Define new ptrace constants unconditionally.
* strace.c (detach): Fix comment.
(trace): Remove now unnecessary "if USE_SEIZE".

Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
defs.h
strace.c

diff --git a/defs.h b/defs.h
index 3f07c4f38f7e858e39993ff2a4b057488aeae73e..fbbe48cfa1c4f1ab958bd96b003892990b6fe735 100644 (file)
--- a/defs.h
+++ b/defs.h
@@ -227,16 +227,14 @@ extern long ptrace(int, int, char *, long);
 # define PTRACE_POKEUSER PTRACE_POKEUSR
 #endif
 
-#if USE_SEIZE
-# undef PTRACE_SEIZE
-# define PTRACE_SEIZE          0x4206
-# undef PTRACE_INTERRUPT
-# define PTRACE_INTERRUPT      0x4207
-# undef PTRACE_LISTEN
-# define PTRACE_LISTEN         0x4208
-# undef PTRACE_EVENT_STOP
-# define PTRACE_EVENT_STOP     128
-#endif
+#undef PTRACE_SEIZE
+#define PTRACE_SEIZE           0x4206
+#undef PTRACE_INTERRUPT
+#define PTRACE_INTERRUPT       0x4207
+#undef PTRACE_LISTEN
+#define PTRACE_LISTEN          0x4208
+#undef PTRACE_EVENT_STOP
+#define PTRACE_EVENT_STOP      128
 
 #ifdef ALPHA
 # define REG_R0 0
index 6eab600fc9517ac081da4ec39521380c084d702e..87aad485c5c5a208ecd68aec2b35fafd33aabc40 100644 (file)
--- a/strace.c
+++ b/strace.c
@@ -724,7 +724,7 @@ droptcb(struct tcb *tcp)
        memset(tcp, 0, sizeof(*tcp));
 }
 
-/* detach traced process; continue with sig
+/* Detach traced process.
  * Never call DETACH twice on the same process as both unattached and
  * attached-unstopped processes give the same ESRCH.  For unattached process we
  * would SIGSTOP it and wait for its SIGSTOP notification forever.
@@ -2252,7 +2252,6 @@ trace(void)
                                goto restart_tracee;
 
                        /* It's group-stop */
-#if USE_SEIZE
                        if (use_seize) {
                                /*
                                 * This ends ptrace-stop, but does *not* end group-stop.
@@ -2266,7 +2265,6 @@ trace(void)
                                continue;
                        }
                        /* We don't have PTRACE_LISTEN support... */
-#endif
                        goto restart_tracee;
                }