| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: kdump.c,v 1.105 2010/08/08 18:31:50 chs Exp $ */ | | 1 | /* $NetBSD: kdump.c,v 1.106 2011/01/10 05:15:17 christos Exp $ */ |
2 | | | 2 | |
3 | /*- | | 3 | /*- |
4 | * Copyright (c) 1988, 1993 | | 4 | * Copyright (c) 1988, 1993 |
5 | * The Regents of the University of California. All rights reserved. | | 5 | * The Regents of the University of California. All rights reserved. |
6 | * | | 6 | * |
7 | * Redistribution and use in source and binary forms, with or without | | 7 | * Redistribution and use in source and binary forms, with or without |
8 | * modification, are permitted provided that the following conditions | | 8 | * modification, are permitted provided that the following conditions |
9 | * are met: | | 9 | * are met: |
10 | * 1. Redistributions of source code must retain the above copyright | | 10 | * 1. Redistributions of source code must retain the above copyright |
11 | * notice, this list of conditions and the following disclaimer. | | 11 | * notice, this list of conditions and the following disclaimer. |
12 | * 2. Redistributions in binary form must reproduce the above copyright | | 12 | * 2. Redistributions in binary form must reproduce the above copyright |
13 | * notice, this list of conditions and the following disclaimer in the | | 13 | * notice, this list of conditions and the following disclaimer in the |
14 | * documentation and/or other materials provided with the distribution. | | 14 | * documentation and/or other materials provided with the distribution. |
| @@ -29,27 +29,27 @@ | | | @@ -29,27 +29,27 @@ |
29 | * SUCH DAMAGE. | | 29 | * SUCH DAMAGE. |
30 | */ | | 30 | */ |
31 | | | 31 | |
32 | #include <sys/cdefs.h> | | 32 | #include <sys/cdefs.h> |
33 | #ifndef lint | | 33 | #ifndef lint |
34 | __COPYRIGHT("@(#) Copyright (c) 1988, 1993\ | | 34 | __COPYRIGHT("@(#) Copyright (c) 1988, 1993\ |
35 | The Regents of the University of California. All rights reserved."); | | 35 | The Regents of the University of California. All rights reserved."); |
36 | #endif /* not lint */ | | 36 | #endif /* not lint */ |
37 | | | 37 | |
38 | #ifndef lint | | 38 | #ifndef lint |
39 | #if 0 | | 39 | #if 0 |
40 | static char sccsid[] = "@(#)kdump.c 8.4 (Berkeley) 4/28/95"; | | 40 | static char sccsid[] = "@(#)kdump.c 8.4 (Berkeley) 4/28/95"; |
41 | #else | | 41 | #else |
42 | __RCSID("$NetBSD: kdump.c,v 1.105 2010/08/08 18:31:50 chs Exp $"); | | 42 | __RCSID("$NetBSD: kdump.c,v 1.106 2011/01/10 05:15:17 christos Exp $"); |
43 | #endif | | 43 | #endif |
44 | #endif /* not lint */ | | 44 | #endif /* not lint */ |
45 | | | 45 | |
46 | #include <sys/param.h> | | 46 | #include <sys/param.h> |
47 | #define _KERNEL | | 47 | #define _KERNEL |
48 | #include <sys/errno.h> | | 48 | #include <sys/errno.h> |
49 | #undef _KERNEL | | 49 | #undef _KERNEL |
50 | #include <sys/time.h> | | 50 | #include <sys/time.h> |
51 | #include <sys/uio.h> | | 51 | #include <sys/uio.h> |
52 | #include <sys/ktrace.h> | | 52 | #include <sys/ktrace.h> |
53 | #include <sys/ioctl.h> | | 53 | #include <sys/ioctl.h> |
54 | #include <sys/ptrace.h> | | 54 | #include <sys/ptrace.h> |
55 | | | 55 | |
| @@ -926,32 +926,32 @@ ktrpsig(void *v, int len) | | | @@ -926,32 +926,32 @@ ktrpsig(void *v, int len) |
926 | printf(" code=0x%x", psig->ps.code); | | 926 | printf(" code=0x%x", psig->ps.code); |
927 | printf(psig->ps.action == SIG_DFL ? "\n" : ")\n"); | | 927 | printf(psig->ps.action == SIG_DFL ? "\n" : ")\n"); |
928 | return; | | 928 | return; |
929 | case sizeof(*psig): | | 929 | case sizeof(*psig): |
930 | if (si->si_code == 0) { | | 930 | if (si->si_code == 0) { |
931 | printf(": code=SI_USER sent by pid=%d, uid=%d)\n", | | 931 | printf(": code=SI_USER sent by pid=%d, uid=%d)\n", |
932 | si->si_pid, si->si_uid); | | 932 | si->si_pid, si->si_uid); |
933 | return; | | 933 | return; |
934 | } | | 934 | } |
935 | | | 935 | |
936 | if (si->si_code < 0) { | | 936 | if (si->si_code < 0) { |
937 | switch (si->si_code) { | | 937 | switch (si->si_code) { |
938 | case SI_TIMER: | | 938 | case SI_TIMER: |
939 | printf(": code=SI_TIMER sigval %p)\n", | | | |
940 | si->si_value.sival_ptr); | | | |
941 | return; | | | |
942 | case SI_QUEUE: | | 939 | case SI_QUEUE: |
943 | code = "SI_QUEUE"; | | 940 | printf(": code=%s sent by pid=%d, uid=%d with " |
944 | break; | | 941 | "sigval %p)\n", si->si_code == SI_TIMER ? |
| | | 942 | "SI_TIMER" : "SI_QUEUE", si->si_pid, |
| | | 943 | si->si_uid, si->si_value.sival_ptr); |
| | | 944 | return; |
945 | case SI_ASYNCIO: | | 945 | case SI_ASYNCIO: |
946 | code = "SI_ASYNCIO"; | | 946 | code = "SI_ASYNCIO"; |
947 | break; | | 947 | break; |
948 | case SI_MESGQ: | | 948 | case SI_MESGQ: |
949 | code = "SI_MESGQ"; | | 949 | code = "SI_MESGQ"; |
950 | break; | | 950 | break; |
951 | case SI_LWP: | | 951 | case SI_LWP: |
952 | code = "SI_LWP"; | | 952 | code = "SI_LWP"; |
953 | break; | | 953 | break; |
954 | default: | | 954 | default: |
955 | code = NULL; | | 955 | code = NULL; |
956 | break; | | 956 | break; |
957 | } | | 957 | } |