]> granicus.if.org Git - strace/commitdiff
Show PTRACE_EVENT_STOP correctly in debug output
authorDenys Vlasenko <dvlasenk@redhat.com>
Fri, 21 Jun 2013 14:33:56 +0000 (16:33 +0200)
committerDenys Vlasenko <dvlasenk@redhat.com>
Fri, 21 Jun 2013 14:33:56 +0000 (16:33 +0200)
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
strace.c

index ab971b513e7dbd5c05ec911ba19a039d175c46ad..f7678313a0b3633bdc59b603b6e33dcdf7079621 100644 (file)
--- a/strace.c
+++ b/strace.c
@@ -2029,10 +2029,13 @@ trace(void)
                                        [PTRACE_EVENT_VFORK_DONE] = "VFORK_DONE",
                                        [PTRACE_EVENT_EXEC]  = "EXEC",
                                        [PTRACE_EVENT_EXIT]  = "EXIT",
+                                       /* [PTRACE_EVENT_STOP (=128)] would make biggish array */
                                };
                                const char *e;
                                if (event < ARRAY_SIZE(event_names))
                                        e = event_names[event];
+                               else if (event == PTRACE_EVENT_STOP)
+                                       e = "STOP";
                                else {
                                        sprintf(buf, "?? (%u)", event);
                                        e = buf;