-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCFG.TXT
More file actions
384 lines (331 loc) · 10.9 KB
/
Copy pathCFG.TXT
File metadata and controls
384 lines (331 loc) · 10.9 KB
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
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
Declaration :=
'?' QualifiedName IdentType
'?' QualifiedName IdentType IntConst // ::__LINE__Var
'?' QualifiedName '$4' IntConst IntConst CVQThis FuncP // [thunk] `vtordisp'
'?' QualifiedName '$A' Type 'A' // [thunk] `local static destructor helper'
'?' QualifiedName '$B' IntConst 'AE' // [thunk] `vcall'
'?' QualifiedName '$C' QualifiedName // `virtual displacement map'
'??' AnyValidCPPName '$initializer$@' NameQualifier '@2P6AXXZA@@3P6AXXZA'
StringLiteral
QualifiedName :=
BaseName NameQualifier
BaseName :=
StringTemplateName
OperatorName
BackRefStringName
NameQualifier :=
'@'
ClassNamespaceName NameQualifier
ClassNamespaceName :=
StringTemplateName
AnoymousNamespaceName // '?A0x'
'?' Declaration // '??', `Declaration'
'?' IntConst // `IntConst', IntConst here will not begin with A; for static variable inside a function
'?Q' QualifiedName // `[foo::bar]', meaning unknown
AnoymousNamespaceName :=
'?A0x' [0-9a-f]{8} '@'
StringTemplateName :=
StringName
TemplateName
BackRefStringName
StringName :=
AnyValidCPPName '@'
'<lambda_' "[0-9a-f]{32}" '>@' // generated name for lambda
TemplateName :=
'?$' BaseName TplArgList
BackRefStringName :=
"[1-9]"
AnonymousNamespacename :
'?A0x' "[0-9a-f]+" '@'
TplArgList :=
'@'
TplArg TplArgList
TplArg :=
'$$$V' // empty parameter expansion (type)
'$$V' // empty parameter expansion (type or template)
'$$Z' // separater for two consecutive expanstion packs
'$S' // empty parameter expansion for non-type parameter
Type // template template parameter is not distingushable with type template parameter
IntTplArg // Non-type template argument of types: Integral / pointer to data member / nullptr_t
PointerTplArg // Non-type template argument of types: pointer / l-value reference to object / function; pointer to member function
IntTplArg :=
'$0' IntConst
IntConst :=
"[0-9]" // 1 ~ 10
"[A-P][A-P]+" '@' // zero or other positive, A-P <-> 0-F
'?' "[0-9]" // -1 ~ -10
'?' "[A-P][A-P]+" '@' // other negtive
PointerTplArg :=
'?1' Declaration
VariableType :=
VarKind Type CVQVar
'5' IntConst // local static guard
'6B@' // vftable / RTTI Complete Object Locator
'6B' QualifiedName '@' // vftable / RTTI Complete Object Locator for QualifiedName
'7B@' // vbtable
'7B' QualifiedName '@' // vbtable for QualifiedName
'8' // RTTI Type Descriptor / RTTI Base Class Descriptor / RTTI Base Class Array / RTTI Class Hierarchy Descriptor
'9' // used for the function name for local scope static variable
VarKind :=
0 // private: static
1 // protected: static
2 // public: static
3 // normal
4 // function scope static variable
CVQVar :=
SimpleCVQVar
'E' SimpleCVQVar // __ptr64
MemberCVQVar NameQualifier // used in pointer to member, NameQualifier part specifies the "CLASS::" part
SimpleCVQVar :=
'A' //
'B' // const
'C' // volatile
'D' // const volatile
MemberCVQVar :=
'Q' //
'R' // const
'S' // volatile
'T' // const volatile
Type :=
BaseType // int
RefType // pointer, ref
ArrType // Array
CompoundType // class; CompoundType is not used as top-level type, but it can be part of RefType or ArrType
BackRefType
BackRefType :=
[0-9]
ArrType :=
'Y' IntConst{n} Type // The fist IntConst is number of dimension (n), followed by n dimension lengths
RefType :=
RefKind CVQType
RefKind Func
'$$B' ArrType // Array use alone, not part of other RefType. Has no CVQ part.
CVQType :=
CVQVar Type
RefKind :=
? // -- not a reference type. Used when a (possibly cv-qualified) CompoundType is used alone.
A // &
B // & volatile
P // *
Q // * const
R // * volatile
S // * const volatile
$$A // -- not a reference. Used for function. (Not a function pointer nor a function reference, but a function. May appear in template argument)
$$C // -- This is not a reference type. It is used when a simple type need a CV, as only refType has a place for CV
$$Q // &&
CompoundType :=
CompoundSpLt QualifiedName
CompoundSpLt :=
'T' // union
'U' // struct
'V' // class
"W[0-7]" // enum
Func :=
NonMemCVQFunc FuncP
MemCVQFunc NameQualifier CVQThis FuncP // used for pionter to member function
CVQThis :=
CVQVar
'G' CVQVar // &
'H' CVQVar // &&
'$A' CVQVar // ^ ; CVQVar can only be 'A', others are not supported by the language
NonMemCVQFunc :=
6 // normal
MemCVQFunc :=
8
FuncP :=
CallConv RetType ParamList ExceptSpecifier
CallConv :=
'A' // __cdecl
'B' // __cdecl
'C' // __pascal
'D' // __pascal
'E' // __thiscall
'F' // __thiscall
'G' // __stdcall
'H' // __stdcall
'I' // __fastcall
'J' // __fastcall
'M' // __clrcall
'Q' // __vectorcall
ExceptSpecifier: =
ParamList
ParamList :=
'X' // void
NonVoidParamList
NonVoidParamList :=
Type '@'
'Z' // Z stands for ,... here, also used for empty exception specifier
Type NonVoidParamList
RetType :=
Type
'@' // no return type, for functions like contructors, destructors
IdentType :=
VariableType
NonMemFuncMod FuncP
MemFuncMod CVQThis FuncP
MemFuncMod :=
'A' // private:
'C' // private: static
'E' // private: virtual
'I' // protected:
'K' // protected: static
'M' // protected: virtual
'Q' // public:
'S' // public: static
'U' // public: virtual
ThunkFuncMod :=
'G' // private:
'O' // protected:
'W' // public:
NonMemFuncMod :=
'Y'
ThunkAdjustor :=
IntConst
BaseType :=
NonVoidType
'X' // void
OperatorName :=
'?0' // constructor
'?1' // destructor
'?2' // operator new
'?3' // operator delete
'?4' // operator =
'?5' // operator >>
'?6' // operator <<
'?7' // operator !
'?8' // operator ==
'?9' // operator !=
'?A' // operator []
'?B' // operator type conversion
'?C' // operator ->
'?D' // operator *
'?E' // operator ++
'?F' // operator --
'?G' // operator -
'?H' // operator +
'?I' // operator &
'?J' // operator ->*
'?K' // operator /
'?L' // operator %
'?M' // operator <
'?N' // operator <=
'?O' // operator >
'?P' // operator >=
'?Q' // operator ,
'?R' // operator ()
'?S' // operator ~
'?T' // operator ^
'?U' // operator |
'?V' // operator &&
'?W' // operator ||
'?X' // operator *=
'?Y' // operator +=
'?Z' // operator -=
'?_0' // operator /=
'?_1' // operator %=
'?_2' // operator >>=
'?_3' // operator <<=
'?_4' // operator &=
'?_5' // operator |=
'?_6' // operator ^=
'?_7' // `vftable'
'?_8' // `vbtable'
'?_9' // `vcall'
'?_A' // `typeof'
'?_B' // `local static guard'
//'?_C' "$_C#", //string constanst
'?_D' // `vbase destructor'
'?_E' // `vector deleting destructor'
'?_F' // `default constructor closure'
'?_G' // `scalar deleting destructor'
'?_H' // `vector constructor iterator'
'?_I' // `vector destructor iterator'
'?_J' // `vector vbase constructor iterator'
'?_K' // `virtual displacement map'
'?_L' // `eh vector constructor iterator'
'?_M' // `eh vector destructor iterator'
'?_N' // `eh vector vbase constructor iterator'
'?_O' // `copy constructor closure'
//'?_P' "_P",
//'?_Q' "_Q",
'?_R0' Type // `RTTI Type Descriptor'
'?_R1' IntConst{4} // `RTTI Base Class Descriptor'
'?_R2' // `RTTI Base Class Array'
'?_R3' // `RTTI Class Hierarchy Descriptor'
'?_R4' // `RTTI Complete Object Locator'
'?_S' // `local vftable'
'?_T' // `local vftable constructor closure'
'?_U' // operator new[]
'?_V' // operator delete[]
//'?_W' "_W",
'?_X' // `placement delete closure'
'?_Y' // `placement delete[] closure'
//'?_Z' "_Z"
'?__A' // `managed vector constructor iterator'
'?__B' // `managed vector destructor iterator'
'?__C' // `eh vector copy constructor iterator'
'?__D' // `eh vector vbase copy constructor iterator'
'?__E' Declaration // `dynamic initializer for '.''
'?__E' StringName // `dynamic initializer for '.''
'?__F' Declaration // `dynamic atexit destructor for '.''
'?__F' StringName // `dynamic atexit destructor for '.''
'?__G' // `vector copy constructor iterator'
'?__H' // `vector vbase copy constructor iterator'
'?__I' // `managed vector vbase copy constructor'
'?__K' StringName // user define literal operators
'?__L' // operator co_await
'?__M' // operator <=>
StringLiteral :=
'??_C@' StringLiteralType '_' LiteralLength LiteralUID LiteralContent
StringLiteralType :=
'_0' // char, char16_t, char32_t
'_1' // wchat_t
LiteralLength :=
IntConst
LiteralUID :=
IntConst // exact 8 digits
LiteralContent :=
LiteralChar '@'
LiteralChar LiteralContent
LiteralChar :=
'?$' "[A-P]{2}" // two digit hex; A-P <-> 0-F
'?0' // ,
'?1' // /
'?2' // \
'?3' // :
'?4' // .
'?5' // space
'?6' // \n
'?7' // \t
'?8' // '
'?9' // -
"[$0-9A-Za-z_]" // as is
NonVoidType :=
'C' // signed char
'D' // char
'E' // unsigned char
'F' // short
'G' // unsigned short
'H' // int
'I' // unsigned int
'J' // long
'K' // unsigned long
'M' // float
'N' // double
'O' // long double
'_D' // __int8
'_E' // unsigned __int8
'_F' // __int16
'_G' // unsigned __int16
'_H' // __int32
'_I' // unsigned __in32
'_J' // __int64 / long long
'_K' // unsigned __int64 / unsigned long long
'_L' // __int128
'_M' // unsigned __int128
'_N' // bool
'_S' // char16_t
'_T' // decltype(auto)
'_U' // char32_t
'_W' // wchar_t
'$$T' // nullptr_t