| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: subr_prf.c,v 1.133 2009/04/25 15:06:32 rmind Exp $ */ | | 1 | /* $NetBSD: subr_prf.c,v 1.134 2009/06/18 06:26:58 mrg Exp $ */ |
2 | | | 2 | |
3 | /*- | | 3 | /*- |
4 | * Copyright (c) 1986, 1988, 1991, 1993 | | 4 | * Copyright (c) 1986, 1988, 1991, 1993 |
5 | * The Regents of the University of California. All rights reserved. | | 5 | * The Regents of the University of California. All rights reserved. |
6 | * (c) UNIX System Laboratories, Inc. | | 6 | * (c) UNIX System Laboratories, Inc. |
7 | * All or some portions of this file are derived from material licensed | | 7 | * All or some portions of this file are derived from material licensed |
8 | * to the University of California by American Telephone and Telegraph | | 8 | * to the University of California by American Telephone and Telegraph |
9 | * Co. or Unix System Laboratories, Inc. and are reproduced herein with | | 9 | * Co. or Unix System Laboratories, Inc. and are reproduced herein with |
10 | * the permission of UNIX System Laboratories, Inc. | | 10 | * the permission of UNIX System Laboratories, Inc. |
11 | * | | 11 | * |
12 | * Redistribution and use in source and binary forms, with or without | | 12 | * Redistribution and use in source and binary forms, with or without |
13 | * modification, are permitted provided that the following conditions | | 13 | * modification, are permitted provided that the following conditions |
14 | * are met: | | 14 | * are met: |
| @@ -27,27 +27,27 @@ | | | @@ -27,27 +27,27 @@ |
27 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | | 27 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE |
28 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | | 28 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | | 29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS |
30 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | | 30 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) |
31 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | | 31 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT |
32 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | | 32 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
33 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | | 33 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
34 | * SUCH DAMAGE. | | 34 | * SUCH DAMAGE. |
35 | * | | 35 | * |
36 | * @(#)subr_prf.c 8.4 (Berkeley) 5/4/95 | | 36 | * @(#)subr_prf.c 8.4 (Berkeley) 5/4/95 |
37 | */ | | 37 | */ |
38 | | | 38 | |
39 | #include <sys/cdefs.h> | | 39 | #include <sys/cdefs.h> |
40 | __KERNEL_RCSID(0, "$NetBSD: subr_prf.c,v 1.133 2009/04/25 15:06:32 rmind Exp $"); | | 40 | __KERNEL_RCSID(0, "$NetBSD: subr_prf.c,v 1.134 2009/06/18 06:26:58 mrg Exp $"); |
41 | | | 41 | |
42 | #include "opt_ddb.h" | | 42 | #include "opt_ddb.h" |
43 | #include "opt_ipkdb.h" | | 43 | #include "opt_ipkdb.h" |
44 | #include "opt_kgdb.h" | | 44 | #include "opt_kgdb.h" |
45 | #include "opt_dump.h" | | 45 | #include "opt_dump.h" |
46 | | | 46 | |
47 | #include <sys/param.h> | | 47 | #include <sys/param.h> |
48 | #include <sys/stdint.h> | | 48 | #include <sys/stdint.h> |
49 | #include <sys/systm.h> | | 49 | #include <sys/systm.h> |
50 | #include <sys/buf.h> | | 50 | #include <sys/buf.h> |
51 | #include <sys/device.h> | | 51 | #include <sys/device.h> |
52 | #include <sys/reboot.h> | | 52 | #include <sys/reboot.h> |
53 | #include <sys/msgbuf.h> | | 53 | #include <sys/msgbuf.h> |
| @@ -269,31 +269,31 @@ panic(const char *fmt, ...) | | | @@ -269,31 +269,31 @@ panic(const char *fmt, ...) |
269 | #endif | | 269 | #endif |
270 | #ifdef KADB | | 270 | #ifdef KADB |
271 | if (boothowto & RB_KDB) | | 271 | if (boothowto & RB_KDB) |
272 | kdbpanic(); | | 272 | kdbpanic(); |
273 | #endif | | 273 | #endif |
274 | #ifdef DDB | | 274 | #ifdef DDB |
275 | if (db_onpanic == 1) | | 275 | if (db_onpanic == 1) |
276 | Debugger(); | | 276 | Debugger(); |
277 | else if (db_onpanic >= 0) { | | 277 | else if (db_onpanic >= 0) { |
278 | static int intrace = 0; | | 278 | static int intrace = 0; |
279 | | | 279 | |
280 | if (intrace == 0) { | | 280 | if (intrace == 0) { |
281 | intrace = 1; | | 281 | intrace = 1; |
282 | printf("Begin traceback...\n"); | | 282 | printf("cpu%d: Begin traceback...\n", cpu_number()); |
283 | db_stack_trace_print( | | 283 | db_stack_trace_print( |
284 | (db_expr_t)(intptr_t)__builtin_frame_address(0), | | 284 | (db_expr_t)(intptr_t)__builtin_frame_address(0), |
285 | true, 65535, "", printf); | | 285 | true, 65535, "", printf); |
286 | printf("End traceback...\n"); | | 286 | printf("cpu%d: End traceback...\n", cpu_number()); |
287 | intrace = 0; | | 287 | intrace = 0; |
288 | } else | | 288 | } else |
289 | printf("Faulted in mid-traceback; aborting..."); | | 289 | printf("Faulted in mid-traceback; aborting..."); |
290 | if (db_onpanic == 2) | | 290 | if (db_onpanic == 2) |
291 | Debugger(); | | 291 | Debugger(); |
292 | } | | 292 | } |
293 | #endif | | 293 | #endif |
294 | cpu_reboot(bootopt, NULL); | | 294 | cpu_reboot(bootopt, NULL); |
295 | } | | 295 | } |
296 | | | 296 | |
297 | /* | | 297 | /* |
298 | * kernel logging functions: log, logpri, addlog | | 298 | * kernel logging functions: log, logpri, addlog |
299 | */ | | 299 | */ |