xref: /illumos-gate/usr/src/cmd/mdb/common/mdb/mdb_stack.h (revision 3350c9c925acb5854315e9d992703db756886095)
1 /*
2  * This file and its contents are supplied under the terms of the
3  * Common Development and Distribution License ("CDDL"), version 1.0.
4  * You may only use this file in accordance with the terms of version
5  * 1.0 of the CDDL.
6  *
7  * A full copy of the text of the CDDL should have accompanied this
8  * source.  A copy of the CDDL is also available via the Internet at
9  * http://www.illumos.org/license/CDDL.
10  */
11 
12 /*
13  * Copyright 2025 Oxide Computer Company
14  */
15 
16 #ifndef	_MDB_STACK_H
17 #define	_MDB_STACK_H
18 
19 #include <sys/types.h>
20 #include <mdb/mdb_target.h>
21 
22 #ifdef	__cplusplus
23 extern "C" {
24 #endif
25 
26 typedef void mdb_stack_frame_hdl_t;
27 
28 typedef enum {
29 	MSF_VERBOSE		= 1 << 0,
30 	MSF_TYPES		= 1 << 1,
31 	MSF_SIZES		= 1 << 2,
32 	MSF_ADDR		= 1 << 3
33 } mdb_stack_frame_flags_t;
34 
35 #define	MSF_ALL	(MSF_VERBOSE|MSF_TYPES|MSF_SIZES|MSF_ADDR)
36 
37 extern mdb_stack_frame_hdl_t *mdb_stack_frame_init(mdb_tgt_t *, uint_t,
38     mdb_stack_frame_flags_t);
39 extern void mdb_stack_frame(mdb_stack_frame_hdl_t *, uintptr_t, uintptr_t,
40     uint_t, const long *);
41 extern uint_t mdb_stack_frame_arglim(mdb_stack_frame_hdl_t *);
42 extern void mdb_stack_frame_flags_set(mdb_stack_frame_hdl_t *,
43     mdb_stack_frame_flags_t);
44 
45 #ifdef	__cplusplus
46 }
47 #endif
48 
49 #endif	/* _MDB_STACK_H */
50