OSDN Git Service

*** empty log message ***
[drdeamon64/drdeamon64.git] / libgoblin / drd64_libgoblin_binfo.h
1 /*DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64
2
3                          D r . D e a m o n  6 4
4                         for INTEL64(R), AMD64(R)
5         
6    Copyright(C) 2007-2009 Koine Yuusuke(koinec). All rights reserved.
7
8 Redistribution and use in source and binary forms, with or without
9 modification, are permitted provided that the following conditions are met:
10
11  1. Redistributions of source code must retain the above copyright notice,
12     this list of conditions and the following disclaimer.
13  2. Redistributions in binary form must reproduce the above copyright
14     notice, this list of conditions and the following disclaimer in the
15     documentation and/or other materials provided with the distribution.
16
17 THIS SOFTWARE IS PROVIDED BY Koine Yuusuke(koinec) ``AS IS'' AND ANY
18 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20 DISCLAIMED. IN NO EVENT SHALL Koine Yuusuke(koinec) OR CONTRIBUTORS BE
21 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
27 OF THE POSSIBILITY OF SUCH DAMAGE.
28
29 DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64DrDeAmOn64*/
30
31 /* File Info -----------------------------------------------------------
32 File: drd64_.h
33 Function: Header 
34 Comment: 
35 ----------------------------------------------------------------------*/
36
37 #ifndef DRD64_HEADER_LIBGOBLIN_BINFO
38 #define DRD64_HEADER_LIBGOBLIN_BINFO
39
40 #include"drd64_libgoblin.h"
41
42 #ifdef DRD64_SRC_LIBGOBLIN_BINFO
43         #define LIBGOBLIN_BINFO_EXTERN
44 #else
45         #define LIBGOBLIN_BINFO_EXTERN  extern
46 #endif
47
48 #define DRD64_LIBGOBLIN_BINFO_UNITS      8
49
50 #define DRD64_LIBGOBLIN_BINFO_TYPE_NONE         0x00
51 #define DRD64_LIBGOBLIN_BINFO_TYPE_ELF          0x01
52 #define DRD64_LIBGOBLIN_BINFO_TYPE_ELF64        0x64
53 #define DRD64_LIBGOBLIN_BINFO_TYPE_ELF32        0x32
54
55 #define DRD64_LIBGOBLIN_BINFO_ENDIAN_NONE       0x00
56 #define DRD64_LIBGOBLIN_BINFO_ENDIAN_LITTLE     0x01
57 #define DRD64_LIBGOBLIN_BINFO_ENDIAN_BIG        0x02
58
59 typedef struct  {
60         int                     i_id;
61
62         DWord           dw_size;
63         Byte            *p_binary;
64
65         Byte            b_type;
66         Byte            b_endian;
67
68         void            *p_format;
69         
70 } Drd64_LibGoblin_BinaryInfo;
71
72
73
74
75 LIBGOBLIN_BINFO_EXTERN  Drd64_LibGoblin_BinaryInfo              *gp_binary_info;
76 LIBGOBLIN_BINFO_EXTERN  int                                                             gi_max_binary_info;
77 LIBGOBLIN_BINFO_EXTERN  int                                                             gi_now_binary_info;
78
79
80 LIBGOBLIN_BINFO_EXTERN
81         Drd64_LibGoblin_BinaryInfo *
82                 Drd64_LibDrd64_BinInfo_AllocBinInfo(
83                         void );
84
85 LIBGOBLIN_BINFO_EXTERN
86         int
87                 Drd64_LibGoblin_FreeBinaryInfo(
88                         Drd64_LibGoblin_BinaryInfo *p_binfo );
89
90 LIBGOBLIN_BINFO_EXTERN
91         int
92                 Drd64_LibGoblin_InitBinaryInfo(
93                         void );
94
95 LIBGOBLIN_BINFO_EXTERN
96         int
97                 Drd64_LibGoblin_TermBinaryInfo(
98                         void );
99
100 LIBGOBLIN_BINFO_EXTERN
101         Drd64_LibGoblin_BinaryInfo *
102                 Drd64_LibGoblin_BInfo_GetBinaryInfo(
103                         int i_bid );
104
105
106
107 #endif  /* DRD64_HEADER_LIBGOBLIN_BINFO */
108
109 /* EOF of drd64_.h ----------------------------------- */