Print this page
style fixes
take to dis and libdisasm with an axe; does not yet compile
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/lib/libdisasm/sparc/dis_sparc.h
+++ new/usr/src/lib/libdisasm/common/dis_sparc.h
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License (the "License").
6 6 * You may not use this file except in compliance with the License.
7 7 *
8 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 * or http://www.opensolaris.org/os/licensing.
10 10 * See the License for the specific language governing permissions
11 11 * and limitations under the License.
12 12 *
13 13 * When distributing Covered Code, include this CDDL HEADER in each
14 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 * If applicable, add the following below this CDDL HEADER, with the
16 16 * fields enclosed by brackets "[]" replaced with your own identifying
17 17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 18 *
19 19 * CDDL HEADER END
20 20 */
21 21
22 22 /*
23 23 * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
24 24 * Use is subject to license terms.
25 25 */
↓ open down ↓ |
25 lines elided |
↑ open up ↑ |
26 26
27 27 /*
28 28 * Copyright 2007 Jason King. All rights reserved.
29 29 * Use is subject to license terms.
30 30 */
31 31
32 32
33 33 #ifndef _DIS_SPARC_H
34 34 #define _DIS_SPARC_H
35 35
36 -#pragma ident "%Z%%M% %I% %E% SMI"
37 -
38 36 #ifdef __cplusplus
39 37 extern "C" {
40 38 #endif
41 39
42 40 #include <sys/types.h>
43 41
44 42 #define DIS_DEBUG_NONE 0x00L
45 43 #define DIS_DEBUG_COMPAT 0x01L
46 44 #define DIS_DEBUG_SYN_ALL 0x02L
47 45 #define DIS_DEBUG_PRTBIN 0x04L
48 46 #define DIS_DEBUG_PRTFMT 0x08L
49 47
50 48 #define DIS_DEBUG_ALL DIS_DEBUG_SYN_ALL|DIS_DEBUG_PRTBIN|DIS_DEBUG_PRTFMT
51 49
52 -struct dis_handle {
53 - void *dh_data;
54 - dis_lookup_f dh_lookup;
55 - dis_read_f dh_read;
56 - int dh_flags;
50 +typedef struct dis_handle_sparc {
51 + char *dhx_buf;
52 + size_t dhx_buflen;
53 + int dhx_debug;
54 +} dis_handle_sparc_t;
57 55
58 - char *dh_buf;
59 - size_t dh_buflen;
60 - uint64_t dh_addr;
61 - int dh_debug;
62 -};
63 -
64 56 /* different types of things we can have in inst_t */
65 57 #define INST_NONE 0x00
66 58 #define INST_DEF 0x01
67 59 #define INST_TBL 0x02
68 60
69 61 struct inst;
70 62 struct overlay;
71 63
72 64 typedef struct inst inst_t;
73 65 typedef struct overlay overlay_t;
74 66
75 67 typedef int (*format_fcn)(dis_handle_t *, uint32_t, const inst_t *, int);
76 68
77 69 typedef struct table {
78 70 const struct inst *tbl_inp;
79 71 const struct overlay *tbl_ovp;
80 72 format_fcn tbl_fmt;
81 73 uint32_t tbl_field;
82 74 uint32_t tbl_len;
83 75 } table_t;
84 76
85 77 struct inst {
86 78 int in_type;
87 79 int in_arch;
88 80 union {
89 81 struct {
90 82 const char *in_name;
91 83 uint32_t in_flags;
92 84 } in_def;
93 85 const table_t *in_tbl;
94 86 } in_data;
95 87 };
96 88
97 89 struct overlay {
98 90 int ov_idx;
99 91 inst_t ov_inst;
100 92 };
101 93
102 94 extern const table_t initial_table;
103 95
104 96 void prt_binary(uint32_t, int);
105 97 #ifdef __cplusplus
106 98 }
107 99 #endif
108 100
109 101 #endif /* _DIS_SPARC_H */
↓ open down ↓ |
36 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX