xref: /netbsd-src/sys/arch/mips/include/stacktrace.h (revision d914a3c1b942947a8b1fa87645678df29ac8e6ab)
1*d914a3c1Smrg /*	$NetBSD: stacktrace.h,v 1.2 2021/12/11 19:24:21 mrg Exp $	*/
2fc8474c3Smrg 
3fc8474c3Smrg /*
4fc8474c3Smrg  * Copyright (c) 2020 Matthew R. Green
5fc8474c3Smrg  * All rights reserved.
6fc8474c3Smrg  *
7fc8474c3Smrg  * Redistribution and use in source and binary forms, with or without
8fc8474c3Smrg  * modification, are permitted provided that the following conditions
9fc8474c3Smrg  * are met:
10fc8474c3Smrg  * 1. Redistributions of source code must retain the above copyright
11fc8474c3Smrg  *    notice, this list of conditions and the following disclaimer.
12fc8474c3Smrg  * 2. Redistributions in binary form must reproduce the above copyright
13fc8474c3Smrg  *    notice, this list of conditions and the following disclaimer in the
14fc8474c3Smrg  *    documentation and/or other materials provided with the distribution.
15fc8474c3Smrg  *
16fc8474c3Smrg  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
17fc8474c3Smrg  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18fc8474c3Smrg  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19fc8474c3Smrg  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20fc8474c3Smrg  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
21fc8474c3Smrg  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22fc8474c3Smrg  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
23fc8474c3Smrg  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
24fc8474c3Smrg  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25fc8474c3Smrg  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26fc8474c3Smrg  * SUCH DAMAGE.
27fc8474c3Smrg  */
28fc8474c3Smrg 
29fc8474c3Smrg #ifndef _MIPS_STACKTRACE_H_
30fc8474c3Smrg #define _MIPS_STACKTRACE_H_
31fc8474c3Smrg 
32fc8474c3Smrg #include <sys/types.h>
33fc8474c3Smrg 
34fc8474c3Smrg void	stacktrace_subr(mips_reg_t, mips_reg_t, mips_reg_t, mips_reg_t,
35fc8474c3Smrg 	    vaddr_t, vaddr_t, vaddr_t, vaddr_t,
36fc8474c3Smrg 	    void (*)(const char*, ...));
37fc8474c3Smrg 
38fc8474c3Smrg #endif /* _MIPS_STACKTRACE_H_ */
39