Remove NDINIT(9) link again. The old API was removed on 2004/11/12.
[dragonfly.git] / sys / kern / kern_debug.c
CommitLineData
2b5dbafd 1/*
2a7d1513 2 * Copyright (c) 2003 Hiten Pandya <hmp@backplane.com>.
69b54012
HP
3 *
4 * All rights reserved.
5 *
2b5dbafd
HP
6 * Copyright (c) 1986, 1988, 1991, 1993
7 * The Regents of the University of California. All rights reserved.
8 *
9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions
11 * are met:
12 * 1. Redistributions of source code must retain the above copyright
13 * notice unmodified, this list of conditions, and the following
14 * disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
18 * 3. Neither the name of the University nor the names of its contributors
19 * may be used to endorse or promote products derived from this software
20 * without specific prior written permission.
21*
22 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
23 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
24 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
25 * IN NO EVENT SHALL THE AUTHOR OR THE VOICES IN HIS HEAD BE LIABLE FOR ANY
26 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
27 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
29 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
31 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 *
fdd038cc 33 * Adopted from:
2b5dbafd
HP
34 * src/sys/kern/kern_shutdown.c
35 *
2a7d1513 36 * $DragonFly: src/sys/kern/kern_debug.c,v 1.4 2004/02/14 03:54:36 hmp Exp $
2b5dbafd
HP
37 *
38 */
39
40/*
41 * Various debug routines.
42 *
43 */
44
45#include "opt_ddb.h"
46
47#include <sys/param.h>
48#include <sys/systm.h>
49
50#include <ddb/ddb.h>
51
52/*
53 * Simple DDB stack trace funtionality.
54 */
55void
56backtrace(void)
57{
58
59#ifdef DDB
60 printf("Stack backtrace:\n");
61 db_print_backtrace();
62#else
63 printf("Cannot print stack trace.\n");
64 printf("DDB kernel option is needed.\n");
65#endif
66}