16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21
22 /*
23 * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
25 */
26
27 /*
28 * Copyright 2007 Jason King. All rights reserved.
29 * Use is subject to license terms.
30 */
31
32
33 #ifndef _DIS_SPARC_H
34 #define _DIS_SPARC_H
35
36 #pragma ident "%Z%%M% %I% %E% SMI"
37
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41
42 #include <sys/types.h>
43
44 #define DIS_DEBUG_NONE 0x00L
45 #define DIS_DEBUG_COMPAT 0x01L
46 #define DIS_DEBUG_SYN_ALL 0x02L
47 #define DIS_DEBUG_PRTBIN 0x04L
48 #define DIS_DEBUG_PRTFMT 0x08L
49
50 #define DIS_DEBUG_ALL DIS_DEBUG_SYN_ALL|DIS_DEBUG_PRTBIN|DIS_DEBUG_PRTFMT
51
52 struct dis_handle {
53 void *dh_data;
54 dis_lookup_f dh_lookup;
55 dis_read_f dh_read;
56 int dh_flags;
57
58 char *dh_buf;
59 size_t dh_buflen;
60 uint64_t dh_addr;
61 int dh_debug;
62 };
63
64 /* different types of things we can have in inst_t */
65 #define INST_NONE 0x00
66 #define INST_DEF 0x01
67 #define INST_TBL 0x02
68
69 struct inst;
70 struct overlay;
71
72 typedef struct inst inst_t;
73 typedef struct overlay overlay_t;
74
75 typedef int (*format_fcn)(dis_handle_t *, uint32_t, const inst_t *, int);
76
77 typedef struct table {
78 const struct inst *tbl_inp;
79 const struct overlay *tbl_ovp;
80 format_fcn tbl_fmt;
81 uint32_t tbl_field;
82 uint32_t tbl_len;
83 } table_t;
|
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21
22 /*
23 * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
25 */
26
27 /*
28 * Copyright 2007 Jason King. All rights reserved.
29 * Use is subject to license terms.
30 */
31
32
33 #ifndef _DIS_SPARC_H
34 #define _DIS_SPARC_H
35
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39
40 #include <sys/types.h>
41
42 #define DIS_DEBUG_NONE 0x00L
43 #define DIS_DEBUG_COMPAT 0x01L
44 #define DIS_DEBUG_SYN_ALL 0x02L
45 #define DIS_DEBUG_PRTBIN 0x04L
46 #define DIS_DEBUG_PRTFMT 0x08L
47
48 #define DIS_DEBUG_ALL DIS_DEBUG_SYN_ALL|DIS_DEBUG_PRTBIN|DIS_DEBUG_PRTFMT
49
50 typedef struct dis_handle_sparc {
51 char *dhx_buf;
52 size_t dhx_buflen;
53 int dhx_debug;
54 } dis_handle_sparc_t;
55
56 /* different types of things we can have in inst_t */
57 #define INST_NONE 0x00
58 #define INST_DEF 0x01
59 #define INST_TBL 0x02
60
61 struct inst;
62 struct overlay;
63
64 typedef struct inst inst_t;
65 typedef struct overlay overlay_t;
66
67 typedef int (*format_fcn)(dis_handle_t *, uint32_t, const inst_t *, int);
68
69 typedef struct table {
70 const struct inst *tbl_inp;
71 const struct overlay *tbl_ovp;
72 format_fcn tbl_fmt;
73 uint32_t tbl_field;
74 uint32_t tbl_len;
75 } table_t;
|