]> granicus.if.org Git - strace/commitdiff
In debug output, show waitpid status with 6 hex digits, not 4
authorDenys Vlasenko <dvlasenk@redhat.com>
Tue, 2 Jul 2013 10:18:22 +0000 (12:18 +0200)
committerDenys Vlasenko <dvlasenk@redhat.com>
Tue, 2 Jul 2013 10:18:22 +0000 (12:18 +0200)
This shows event byte values better (without variable offset):

 [wait(0x01057f) = 29491] WIFSTOPPED,sig=SIGTRAP,EVENT_FORK (1)
 [wait(0x80057f) = 29492] WIFSTOPPED,sig=SIGTRAP,EVENT_STOP (128)
         ^^

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

index 27412013c959d882346c0aaff79fd51e105991fe..f5ce18ded3fb63acf8fa6d04deda4a657a187c1d 100644 (file)
--- a/strace.c
+++ b/strace.c
@@ -2039,7 +2039,7 @@ trace(void)
                                        e = "STOP";
                                sprintf(evbuf, ",EVENT_%s (%u)", e, event);
                        }
-                       fprintf(stderr, " [wait(0x%04x) = %u] %s%s\n", status, pid, buf, evbuf);
+                       fprintf(stderr, " [wait(0x%06x) = %u] %s%s\n", status, pid, buf, evbuf);
                }
 
                /* Look up 'pid' in our table. */