Print this page
remove more unused crap
take to dis and libdisasm with an axe; does not yet compile
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/dis/dis_target.h
+++ new/usr/src/cmd/dis/dis_target.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 2006 Sun Microsystems, Inc. All rights reserved.
24 24 * Use is subject to license terms.
25 25 *
26 26 * Copyright 2011 Jason King. All rights reserved.
27 27 */
28 28
29 29 #ifndef _DIS_TARGET_H
30 30 #define _DIS_TARGET_H
31 31
32 32 #ifdef __cplusplus
33 33 extern "C" {
34 34 #endif
35 35
36 36 #include <gelf.h>
37 37 #include <sys/types.h>
38 38
39 39 /*
40 40 * Basic types
41 41 */
42 42 typedef struct dis_tgt dis_tgt_t;
43 43 typedef struct dis_func dis_func_t;
44 44 typedef struct dis_scn dis_scn_t;
45 45
46 46 /*
↓ open down ↓ |
46 lines elided |
↑ open up ↑ |
47 47 * Target management
48 48 */
49 49 dis_tgt_t *dis_tgt_create(const char *);
50 50 void dis_tgt_destroy(dis_tgt_t *);
51 51 const char *dis_tgt_lookup(dis_tgt_t *, uint64_t, off_t *, int, size_t *,
52 52 int *);
53 53 const char *dis_find_section(dis_tgt_t *, uint64_t, off_t *);
54 54 const char *dis_tgt_name(dis_tgt_t *);
55 55 const char *dis_tgt_member(dis_tgt_t *);
56 56 void dis_tgt_ehdr(dis_tgt_t *, GElf_Ehdr *);
57 -#if !defined(__sparc)
58 57 off_t dis_tgt_next_symbol(dis_tgt_t *, uint64_t);
59 -#endif
60 58 dis_tgt_t *dis_tgt_next(dis_tgt_t *);
61 59
62 60 /*
63 61 * Section management
64 62 */
65 63 typedef void (*section_iter_f)(dis_tgt_t *, dis_scn_t *, void *);
66 64 void dis_tgt_section_iter(dis_tgt_t *, section_iter_f, void *);
67 65
68 66 int dis_section_istext(dis_scn_t *);
69 67 void *dis_section_data(dis_scn_t *);
70 68 size_t dis_section_size(dis_scn_t *);
71 69 uint64_t dis_section_addr(dis_scn_t *);
72 70 const char *dis_section_name(dis_scn_t *);
73 71 dis_scn_t *dis_section_copy(dis_scn_t *);
74 72 void dis_section_free(dis_scn_t *);
75 73
76 74 /*
77 75 * Function management
78 76 */
79 77 typedef void (*function_iter_f)(dis_tgt_t *, dis_func_t *, void *);
80 78 void dis_tgt_function_iter(dis_tgt_t *, function_iter_f, void *);
81 79 dis_func_t *dis_tgt_function_lookup(dis_tgt_t *, const char *);
82 80
83 81 void *dis_function_data(dis_func_t *);
84 82 size_t dis_function_size(dis_func_t *);
85 83 uint64_t dis_function_addr(dis_func_t *);
86 84 const char *dis_function_name(dis_func_t *);
87 85 dis_func_t *dis_function_copy(dis_func_t *);
88 86 void dis_function_free(dis_func_t *);
89 87
90 88 #ifdef __cplusplus
91 89 }
92 90 #endif
93 91
94 92 #endif /* _DIS_TARGET_H */
↓ open down ↓ |
25 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX