findstack.h revision c9a6ea2e938727c95af7108c5e00eee4c890c7ae
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
*/
#ifndef _MDB_FINDSTACK_H
#define _MDB_FINDSTACK_H
#include <mdb/mdb_modapi.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct findstack_info {
#define FSI_FAIL_BADTHREAD 1
#define FSI_FAIL_NOTINMEMORY 2
#define FSI_FAIL_THREADCORRUPT 3
#define FSI_FAIL_STACKNOTFOUND 4
typedef struct stacks_module {
/*
* The following routines are implemented in findstack.c, shared across both
* genunix and libc.
*/
extern void stacks_cleanup(int);
/*
* The following routines are specific to their context (kernel vs. user-land)
* and are therefore implemented in findstack_subr.c (of which each of genunix
* and libc have their own copy).
*/
extern void stacks_help(void);
extern void stacks_findstack_cleanup();
extern int stacks_module(stacks_module_t *);
extern int findstack_debug_on;
#define fs_dprintf(x) \
if (findstack_debug_on) { \
mdb_printf("findstack debug: "); \
/*CSTYLED*/ \
mdb_printf x ; \
}
#ifdef __cplusplus
}
#endif
#endif /* _MDB_FINDSTACK_H */