xref: /freebsd/contrib/llvm-project/llvm/include/llvm/DebugInfo/CodeView/CodeViewSymbols.def (revision 02e9120893770924227138ba49df1edb3896112a)
1//===-- CodeViewSymbols.def - All CodeView leaf types -----------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// See LEAF_ENUM_e in cvinfo.h. This should match the constants there.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef CV_SYMBOL
14#define CV_SYMBOL(ename, value)
15#endif
16
17#ifndef SYMBOL_RECORD
18#define SYMBOL_RECORD(lf_ename, value, name) CV_SYMBOL(lf_ename, value)
19#endif
20
21#ifndef SYMBOL_RECORD_ALIAS
22#define SYMBOL_RECORD_ALIAS(lf_ename, value, name, alias_name)                   \
23  SYMBOL_RECORD(lf_ename, value, name)
24#endif
25
26// 16 bit symbol types. Not very useful, provided only for reference.
27CV_SYMBOL(S_COMPILE       , 0x0001)
28CV_SYMBOL(S_REGISTER_16t  , 0x0002)
29CV_SYMBOL(S_CONSTANT_16t  , 0x0003)
30CV_SYMBOL(S_UDT_16t       , 0x0004)
31CV_SYMBOL(S_SSEARCH       , 0x0005)
32CV_SYMBOL(S_SKIP          , 0x0007)
33CV_SYMBOL(S_CVRESERVE     , 0x0008)
34CV_SYMBOL(S_OBJNAME_ST    , 0x0009)
35CV_SYMBOL(S_ENDARG        , 0x000a)
36CV_SYMBOL(S_COBOLUDT_16t  , 0x000b)
37CV_SYMBOL(S_MANYREG_16t   , 0x000c)
38CV_SYMBOL(S_RETURN        , 0x000d)
39CV_SYMBOL(S_ENTRYTHIS     , 0x000e)
40CV_SYMBOL(S_BPREL16       , 0x0100)
41CV_SYMBOL(S_LDATA16       , 0x0101)
42CV_SYMBOL(S_GDATA16       , 0x0102)
43CV_SYMBOL(S_PUB16         , 0x0103)
44CV_SYMBOL(S_LPROC16       , 0x0104)
45CV_SYMBOL(S_GPROC16       , 0x0105)
46CV_SYMBOL(S_THUNK16       , 0x0106)
47CV_SYMBOL(S_BLOCK16       , 0x0107)
48CV_SYMBOL(S_WITH16        , 0x0108)
49CV_SYMBOL(S_LABEL16       , 0x0109)
50CV_SYMBOL(S_CEXMODEL16    , 0x010a)
51CV_SYMBOL(S_VFTABLE16     , 0x010b)
52CV_SYMBOL(S_REGREL16      , 0x010c)
53CV_SYMBOL(S_BPREL32_16t   , 0x0200)
54CV_SYMBOL(S_LDATA32_16t   , 0x0201)
55CV_SYMBOL(S_GDATA32_16t   , 0x0202)
56CV_SYMBOL(S_PUB32_16t     , 0x0203)
57CV_SYMBOL(S_LPROC32_16t   , 0x0204)
58CV_SYMBOL(S_GPROC32_16t   , 0x0205)
59CV_SYMBOL(S_THUNK32_ST    , 0x0206)
60CV_SYMBOL(S_BLOCK32_ST    , 0x0207)
61CV_SYMBOL(S_WITH32_ST     , 0x0208)
62CV_SYMBOL(S_LABEL32_ST    , 0x0209)
63CV_SYMBOL(S_CEXMODEL32    , 0x020a)
64CV_SYMBOL(S_VFTABLE32_16t , 0x020b)
65CV_SYMBOL(S_REGREL32_16t  , 0x020c)
66CV_SYMBOL(S_LTHREAD32_16t , 0x020d)
67CV_SYMBOL(S_GTHREAD32_16t , 0x020e)
68CV_SYMBOL(S_SLINK32       , 0x020f)
69CV_SYMBOL(S_LPROCMIPS_16t , 0x0300)
70CV_SYMBOL(S_GPROCMIPS_16t , 0x0301)
71CV_SYMBOL(S_PROCREF_ST    , 0x0400)
72CV_SYMBOL(S_DATAREF_ST    , 0x0401)
73CV_SYMBOL(S_ALIGN         , 0x0402)
74CV_SYMBOL(S_LPROCREF_ST   , 0x0403)
75CV_SYMBOL(S_OEM           , 0x0404)
76
77// All post 16 bit symbol types have the 0x1000 bit set.
78CV_SYMBOL(S_TI16_MAX      , 0x1000)
79
80// Mostly unused "start" symbol types.
81CV_SYMBOL(S_REGISTER_ST   , 0x1001)
82CV_SYMBOL(S_CONSTANT_ST   , 0x1002)
83CV_SYMBOL(S_UDT_ST        , 0x1003)
84CV_SYMBOL(S_COBOLUDT_ST   , 0x1004)
85CV_SYMBOL(S_MANYREG_ST    , 0x1005)
86CV_SYMBOL(S_BPREL32_ST    , 0x1006)
87CV_SYMBOL(S_LDATA32_ST    , 0x1007)
88CV_SYMBOL(S_GDATA32_ST    , 0x1008)
89CV_SYMBOL(S_PUB32_ST      , 0x1009)
90CV_SYMBOL(S_LPROC32_ST    , 0x100a)
91CV_SYMBOL(S_GPROC32_ST    , 0x100b)
92CV_SYMBOL(S_VFTABLE32     , 0x100c)
93CV_SYMBOL(S_REGREL32_ST   , 0x100d)
94CV_SYMBOL(S_LTHREAD32_ST  , 0x100e)
95CV_SYMBOL(S_GTHREAD32_ST  , 0x100f)
96CV_SYMBOL(S_LPROCMIPS_ST  , 0x1010)
97CV_SYMBOL(S_GPROCMIPS_ST  , 0x1011)
98
99CV_SYMBOL(S_COMPILE2_ST   , 0x1013)
100CV_SYMBOL(S_MANYREG2_ST   , 0x1014)
101CV_SYMBOL(S_LPROCIA64_ST  , 0x1015)
102CV_SYMBOL(S_GPROCIA64_ST  , 0x1016)
103CV_SYMBOL(S_LOCALSLOT_ST  , 0x1017)
104CV_SYMBOL(S_PARAMSLOT_ST  , 0x1018)
105CV_SYMBOL(S_GMANPROC_ST   , 0x101a)
106CV_SYMBOL(S_LMANPROC_ST   , 0x101b)
107CV_SYMBOL(S_RESERVED1     , 0x101c)
108CV_SYMBOL(S_RESERVED2     , 0x101d)
109CV_SYMBOL(S_RESERVED3     , 0x101e)
110CV_SYMBOL(S_RESERVED4     , 0x101f)
111CV_SYMBOL(S_LMANDATA_ST   , 0x1020)
112CV_SYMBOL(S_GMANDATA_ST   , 0x1021)
113CV_SYMBOL(S_MANFRAMEREL_ST, 0x1022)
114CV_SYMBOL(S_MANREGISTER_ST, 0x1023)
115CV_SYMBOL(S_MANSLOT_ST    , 0x1024)
116CV_SYMBOL(S_MANMANYREG_ST , 0x1025)
117CV_SYMBOL(S_MANREGREL_ST  , 0x1026)
118CV_SYMBOL(S_MANMANYREG2_ST, 0x1027)
119CV_SYMBOL(S_MANTYPREF     , 0x1028)
120CV_SYMBOL(S_UNAMESPACE_ST , 0x1029)
121
122// End of S_*_ST symbols, which do not appear to be generated by modern
123// compilers.
124CV_SYMBOL(S_ST_MAX        , 0x1100)
125
126
127CV_SYMBOL(S_WITH32        , 0x1104)
128CV_SYMBOL(S_MANYREG       , 0x110a)
129CV_SYMBOL(S_LPROCMIPS     , 0x1114)
130CV_SYMBOL(S_GPROCMIPS     , 0x1115)
131CV_SYMBOL(S_MANYREG2      , 0x1117)
132CV_SYMBOL(S_LPROCIA64     , 0x1118)
133CV_SYMBOL(S_GPROCIA64     , 0x1119)
134CV_SYMBOL(S_LOCALSLOT     , 0x111a)
135CV_SYMBOL(S_PARAMSLOT     , 0x111b)
136
137// Managed code symbols.
138CV_SYMBOL(S_MANFRAMEREL   , 0x111e)
139CV_SYMBOL(S_MANREGISTER   , 0x111f)
140CV_SYMBOL(S_MANSLOT       , 0x1120)
141CV_SYMBOL(S_MANMANYREG    , 0x1121)
142CV_SYMBOL(S_MANREGREL     , 0x1122)
143CV_SYMBOL(S_MANMANYREG2   , 0x1123)
144CV_SYMBOL(S_DATAREF       , 0x1126)
145CV_SYMBOL(S_ANNOTATIONREF , 0x1128)
146CV_SYMBOL(S_TOKENREF      , 0x1129)
147CV_SYMBOL(S_GMANPROC      , 0x112a)
148CV_SYMBOL(S_LMANPROC      , 0x112b)
149CV_SYMBOL(S_ATTR_FRAMEREL , 0x112e)
150CV_SYMBOL(S_ATTR_REGISTER , 0x112f)
151CV_SYMBOL(S_ATTR_REGREL   , 0x1130)
152CV_SYMBOL(S_ATTR_MANYREG  , 0x1131)
153
154
155CV_SYMBOL(S_SEPCODE       , 0x1132)
156CV_SYMBOL(S_LOCAL_2005    , 0x1133)
157CV_SYMBOL(S_DEFRANGE_2005 , 0x1134)
158CV_SYMBOL(S_DEFRANGE2_2005, 0x1135)
159CV_SYMBOL(S_DISCARDED     , 0x113b)
160
161// Current symbol types for most procedures as of this writing.
162CV_SYMBOL(S_LPROCMIPS_ID   , 0x1148)
163CV_SYMBOL(S_GPROCMIPS_ID   , 0x1149)
164CV_SYMBOL(S_LPROCIA64_ID   , 0x114a)
165CV_SYMBOL(S_GPROCIA64_ID   , 0x114b)
166
167CV_SYMBOL(S_DEFRANGE_HLSL  , 0x1150)
168CV_SYMBOL(S_GDATA_HLSL     , 0x1151)
169CV_SYMBOL(S_LDATA_HLSL     , 0x1152)
170CV_SYMBOL(S_LOCAL_DPC_GROUPSHARED, 0x1154)
171CV_SYMBOL(S_DEFRANGE_DPC_PTR_TAG, 0x1157)
172CV_SYMBOL(S_DPC_SYM_TAG_MAP, 0x1158)
173CV_SYMBOL(S_ARMSWITCHTABLE , 0x1159)
174CV_SYMBOL(S_POGODATA       , 0x115c)
175CV_SYMBOL(S_INLINESITE2    , 0x115d)
176CV_SYMBOL(S_MOD_TYPEREF    , 0x115f)
177CV_SYMBOL(S_REF_MINIPDB    , 0x1160)
178CV_SYMBOL(S_PDBMAP         , 0x1161)
179CV_SYMBOL(S_GDATA_HLSL32   , 0x1162)
180CV_SYMBOL(S_LDATA_HLSL32   , 0x1163)
181CV_SYMBOL(S_GDATA_HLSL32_EX, 0x1164)
182CV_SYMBOL(S_LDATA_HLSL32_EX, 0x1165)
183
184CV_SYMBOL(S_FASTLINK, 0x1167) // Undocumented
185SYMBOL_RECORD_ALIAS(S_INLINEES, 0x1168, InlineesSym, CallerSym) // Undocumented
186
187// Known symbol types
188SYMBOL_RECORD(S_END                  , 0x0006, ScopeEndSym)
189SYMBOL_RECORD_ALIAS(S_INLINESITE_END , 0x114e, InlineSiteEnd, ScopeEndSym)
190SYMBOL_RECORD_ALIAS(S_PROC_ID_END    , 0x114f, ProcEnd, ScopeEndSym)
191
192SYMBOL_RECORD(S_THUNK32       , 0x1102, Thunk32Sym)
193SYMBOL_RECORD(S_TRAMPOLINE    , 0x112c, TrampolineSym)
194SYMBOL_RECORD(S_SECTION       , 0x1136, SectionSym)
195SYMBOL_RECORD(S_COFFGROUP     , 0x1137, CoffGroupSym)
196SYMBOL_RECORD(S_EXPORT        , 0x1138, ExportSym)
197
198SYMBOL_RECORD(S_LPROC32       , 0x110f, ProcSym)
199SYMBOL_RECORD_ALIAS(S_GPROC32       , 0x1110, GlobalProcSym, ProcSym)
200SYMBOL_RECORD_ALIAS(S_LPROC32_ID     , 0x1146, ProcIdSym, ProcSym)
201SYMBOL_RECORD_ALIAS(S_GPROC32_ID     , 0x1147, GlobalProcIdSym, ProcSym)
202SYMBOL_RECORD_ALIAS(S_LPROC32_DPC    , 0x1155, DPCProcSym, ProcSym)
203SYMBOL_RECORD_ALIAS(S_LPROC32_DPC_ID , 0x1156, DPCProcIdSym, ProcSym)
204
205SYMBOL_RECORD(S_REGISTER      , 0x1106, RegisterSym)
206SYMBOL_RECORD(S_PUB32         , 0x110e, PublicSym32)
207
208SYMBOL_RECORD(S_PROCREF       , 0x1125, ProcRefSym)
209SYMBOL_RECORD_ALIAS(S_LPROCREF, 0x1127, LocalProcRef, ProcRefSym)
210
211
212SYMBOL_RECORD(S_ENVBLOCK      , 0x113d, EnvBlockSym)
213
214SYMBOL_RECORD(S_INLINESITE     , 0x114d, InlineSiteSym)
215SYMBOL_RECORD(S_LOCAL         , 0x113e, LocalSym)
216SYMBOL_RECORD(S_DEFRANGE      , 0x113f, DefRangeSym)
217SYMBOL_RECORD(S_DEFRANGE_SUBFIELD, 0x1140, DefRangeSubfieldSym)
218SYMBOL_RECORD(S_DEFRANGE_REGISTER, 0x1141, DefRangeRegisterSym)
219SYMBOL_RECORD(S_DEFRANGE_FRAMEPOINTER_REL, 0x1142, DefRangeFramePointerRelSym)
220SYMBOL_RECORD(S_DEFRANGE_SUBFIELD_REGISTER, 0x1143, DefRangeSubfieldRegisterSym)
221SYMBOL_RECORD(S_DEFRANGE_FRAMEPOINTER_REL_FULL_SCOPE, 0x1144, DefRangeFramePointerRelFullScopeSym)
222SYMBOL_RECORD(S_DEFRANGE_REGISTER_REL, 0x1145, DefRangeRegisterRelSym)
223SYMBOL_RECORD(S_BLOCK32       , 0x1103, BlockSym)
224SYMBOL_RECORD(S_LABEL32       , 0x1105, LabelSym)
225SYMBOL_RECORD(S_OBJNAME       , 0x1101, ObjNameSym)
226SYMBOL_RECORD(S_COMPILE2      , 0x1116, Compile2Sym)
227SYMBOL_RECORD(S_COMPILE3      , 0x113c, Compile3Sym)
228SYMBOL_RECORD(S_FRAMEPROC     , 0x1012, FrameProcSym)
229SYMBOL_RECORD(S_CALLSITEINFO  , 0x1139, CallSiteInfoSym)
230SYMBOL_RECORD(S_FILESTATIC     , 0x1153, FileStaticSym)
231SYMBOL_RECORD(S_HEAPALLOCSITE  , 0x115e, HeapAllocationSiteSym)
232SYMBOL_RECORD(S_FRAMECOOKIE   , 0x113a, FrameCookieSym)
233
234SYMBOL_RECORD(S_CALLEES        , 0x115a, CallerSym)
235SYMBOL_RECORD_ALIAS(S_CALLERS, 0x115b, CalleeSym, CallerSym)
236
237SYMBOL_RECORD(S_UDT           , 0x1108, UDTSym)
238SYMBOL_RECORD_ALIAS(S_COBOLUDT      , 0x1109, CobolUDT, UDTSym)
239
240SYMBOL_RECORD(S_BUILDINFO      , 0x114c, BuildInfoSym)
241SYMBOL_RECORD(S_BPREL32       , 0x110b, BPRelativeSym)
242SYMBOL_RECORD(S_REGREL32      , 0x1111, RegRelativeSym)
243
244SYMBOL_RECORD(S_CONSTANT      , 0x1107, ConstantSym)
245SYMBOL_RECORD_ALIAS(S_MANCONSTANT   , 0x112d, ManagedConstant, ConstantSym)
246
247SYMBOL_RECORD(S_LDATA32       , 0x110c, DataSym)
248SYMBOL_RECORD_ALIAS(S_GDATA32       , 0x110d, GlobalData, DataSym)
249SYMBOL_RECORD_ALIAS(S_LMANDATA      , 0x111c, ManagedLocalData, DataSym)
250SYMBOL_RECORD_ALIAS(S_GMANDATA      , 0x111d, ManagedGlobalData, DataSym)
251
252SYMBOL_RECORD(S_LTHREAD32     , 0x1112, ThreadLocalDataSym)
253SYMBOL_RECORD_ALIAS(S_GTHREAD32     , 0x1113, GlobalTLS, ThreadLocalDataSym)
254
255SYMBOL_RECORD(S_UNAMESPACE    , 0x1124, UsingNamespaceSym)
256SYMBOL_RECORD(S_ANNOTATION    , 0x1019, AnnotationSym)
257
258#undef CV_SYMBOL
259#undef SYMBOL_RECORD
260#undef SYMBOL_RECORD_ALIAS
261