-
Notifications
You must be signed in to change notification settings - Fork 1
/
sdconfig.h
executable file
·192 lines (161 loc) · 4.46 KB
/
sdconfig.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
#ifndef __SDCONFIG_H
#define __SDCONFIG_H
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#define SD_X86_WIN32 1
#define SD_X86_WCE 2
#define SD_PXA270_WCE 3
#define SD_PXA255_WCE 4
#define SD_X64_WIN64 5
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#ifndef SD_ARCH
#error "You need to set SD_ARCH."
#endif
#if SD_ARCH==SD_X86_WIN32
#include<windows.h>
#define LITTLE_ENDIAN 1
#define HASH_SIZE_BITS (12)
#define CALLSTACK_DEPTH (1024)
#define MAX_CONCURRENT_THREADS (1024)
#define MAX_MODULES (256)
#define HASH_FULL_PERCENT256 (128)
#define WINDOWSCODE 1
#define HAS_PENTER_PEXIT 1
#define FAST_MODULE_TABLE 1
#define STACKGROWSDOWN 1
#define PE32_MODULE_TAGGING 1
typedef unsigned __int64 UINT64;
typedef signed __int64 INT64;
typedef unsigned int UINT32;
typedef signed int INT32;
typedef unsigned short UINT16;
typedef signed short INT16;
typedef unsigned char UINT8;
typedef signed char INT8;
typedef size_t ADDRESS;
typedef HANDLE FILEMAP;
typedef HANDLE THREAD;
#elif SD_ARCH==SD_X86_WCE
#include<windows.h>
#include<tlhelp32.h>
#define LITTLE_ENDIAN 1
#define HASH_SIZE_BITS (10)
#define CALLSTACK_DEPTH (1024)
#define MAX_CONCURRENT_THREADS (1024)
#define MAX_MODULES (256)
#define HASH_FULL_PERCENT256 (128)
#define WINDOWSCODE 1
#define WINDOWSCE 1
#define HAS_CALLCAP 1
#define FAST_MODULE_TABLE 1
#define STACKGROWSDOWN 1
#define PE32_MODULE_TAGGING 1
typedef unsigned __int64 UINT64;
typedef signed __int64 INT64;
typedef unsigned int UINT32;
typedef signed int INT32;
typedef unsigned short UINT16;
typedef signed short INT16;
typedef unsigned char UINT8;
typedef signed char INT8;
typedef size_t ADDRESS;
typedef HANDLE FILEMAP;
typedef UINT32 THREAD;
#elif SD_ARCH==SD_PXA270_WCE
#include<windows.h>
#include<tlhelp32.h>
#define LITTLE_ENDIAN 1
#define HASH_SIZE_BITS (10)
#define CALLSTACK_DEPTH (1024)
#define MAX_CONCURRENT_THREADS (1024)
#define MAX_MODULES (256)
#define HASH_FULL_PERCENT256 (128)
#define WINDOWSCODE 1
#define WINDOWSCE 1
#define HAS_CALLCAP 1
#define HAS_FASTCAP 1
#define FAST_MODULE_TABLE 1
#define STACKGROWSDOWN 1
#define PE32_MODULE_TAGGING 1
typedef unsigned __int64 UINT64;
typedef signed __int64 INT64;
typedef unsigned int UINT32;
typedef signed int INT32;
typedef unsigned short UINT16;
typedef signed short INT16;
typedef unsigned char UINT8;
typedef signed char INT8;
typedef size_t ADDRESS;
typedef HANDLE FILEMAP;
typedef UINT32 THREAD;
#elif SD_ARCH==SD_PXA255_WCE
#include<windows.h>
#include<tlhelp32.h>
#define LITTLE_ENDIAN 1
#define HASH_SIZE_BITS (10)
#define CALLSTACK_DEPTH (1024)
#define MAX_CONCURRENT_THREADS (1024)
#define MAX_MODULES (256)
#define HASH_FULL_PERCENT256 (128)
#define WINDOWSCODE 1
#define WINDOWSCE 1
#define HAS_CALLCAP 1
#define HAS_FASTCAP 1
#define FAST_MODULE_TABLE 1
#define STACKGROWSDOWN 1
#define PE32_MODULE_TAGGING 1
typedef unsigned __int64 UINT64;
typedef signed __int64 INT64;
typedef unsigned int UINT32;
typedef signed int INT32;
typedef unsigned short UINT16;
typedef signed short INT16;
typedef unsigned char UINT8;
typedef signed char INT8;
typedef size_t ADDRESS;
typedef HANDLE FILEMAP;
typedef UINT32 THREAD;
#elif SD_ARCH==SD_X64_WIN64
#include<windows.h>
#define LITTLE_ENDIAN 1
#define HASH_SIZE_BITS (12)
#define CALLSTACK_DEPTH (1024)
#define MAX_CONCURRENT_THREADS (1024)
#define MAX_MODULES (256)
#define HASH_FULL_PERCENT256 (128)
#define WINDOWSCODE 1
#define HAS_PENTER_PEXIT 1
#define STACKGROWSDOWN 1
#define PE32_MODULE_TAGGING 1
typedef unsigned __int64 UINT64;
typedef signed __int64 INT64;
typedef unsigned int UINT32;
typedef signed int INT32;
typedef unsigned short UINT16;
typedef signed short INT16;
typedef unsigned char UINT8;
typedef signed char INT8;
typedef size_t ADDRESS;
typedef HANDLE FILEMAP;
typedef HANDLE THREAD;
#else
#error "Need to choose a valid architecture. Set SD_ARCH."
#endif
union SPLIT64
{
struct
{
#ifdef LITTLE_ENDIAN
UINT32 low;
UINT32 high;
#else
UINT32 high;
UINT32 low;
#endif
};
UINT64 all;
};
// Validation
#if HASH_SIZE_BITS<10
#error "Initial hash size too small."
#endif
#endif