Added mappings for a few messages.
[wine] / tools / cvdump / cvinclude.h
1 /*
2  * CodeView 4 Debug format - declarations
3  *
4  * (based on cvinfo.h and cvexefmt.h from the Win32 SDK)
5  */
6
7 #define sstModule           0x120
8 #define sstAlignSym         0x125
9 #define sstSrcModule        0x127
10 #define sstLibraries        0x128
11 #define sstGlobalSym        0x129
12 #define sstGlobalPub        0x12a
13 #define sstGlobalTypes      0x12b
14 #define sstSegMap           0x12d
15 #define sstFileIndex        0x133
16 #define sstStaticSym        0x134
17
18 #if 0
19 /* Old, crusty value */
20 #define S_PUB32             0x0203
21 #endif
22
23 #define S_PUB32             0x1009
24
25 #include "pshpack1.h"
26
27 /* FIXME: no idea if this is correct */
28 typedef struct
29 {
30     DWORD unknown1;
31     DWORD SizeOfData;
32     WORD  unknown2;
33     WORD  unknown3;
34     char  Name[MAX_PATH];
35 } IMAGE_DEBUG_DIRECTORY_MISC;
36
37 /*
38  * CodeView headers
39  */
40
41 typedef struct OMFSignature 
42 {
43     char        Signature[4];
44     long        filepos;
45 } OMFSignature;
46
47 typedef struct OMFDirHeader 
48 {
49     unsigned short  cbDirHeader;
50     unsigned short  cbDirEntry;
51     unsigned long   cDir;
52     long            lfoNextDir;
53     unsigned long   flags;
54 } OMFDirHeader;
55
56 typedef struct OMFDirEntry 
57 {
58     unsigned short  SubSection;
59     unsigned short  iMod;
60     long            lfo;
61     unsigned long   cb;
62 } OMFDirEntry;
63
64
65 /*
66  * sstModule subsection
67  */
68
69 typedef struct OMFSegDesc 
70 {
71     unsigned short  Seg;
72     unsigned short  pad;
73     unsigned long   Off;
74     unsigned long   cbSeg;
75 } OMFSegDesc;
76
77 /* Must chop off the OMFSegDesc* field, because we need to write this
78  * struct out to a file.  If we write the whole struct out, we'll end up
79  * with (*OMFSegDesc), not (OMFSegDesc).  See OMFModuleFull.
80  */
81 typedef struct OMFModule 
82 {
83     unsigned short  ovlNumber;
84     unsigned short  iLib;
85     unsigned short  cSeg;
86     char            Style[2];
87 } OMFModule;
88
89 /* Full version, with memory pointers, too.  Use OMFModule for writing out to
90  * a file, and OMFModuleFull for reading.  If offsetof() were available, we
91  * could use that instead.
92  */
93 typedef struct OMFModuleFull
94 {
95     unsigned short  ovlNumber;
96     unsigned short  iLib;
97     unsigned short  cSeg;
98     char            Style[2];
99     OMFSegDesc      *SegInfo;
100     char            *Name;
101 } OMFModuleFull;
102
103
104 /*
105  * sstGlobalPub section
106  */
107
108 /* Header for symbol table.
109  */
110 typedef struct OMFSymHash 
111 {
112     unsigned short  symhash;
113     unsigned short  addrhash;
114     unsigned long   cbSymbol;
115     unsigned long   cbHSym;
116     unsigned long   cbHAddr;
117 } OMFSymHash;
118
119 /* Symbol table entry.
120  */
121 typedef struct DATASYM32 
122 {
123     unsigned short  reclen;
124     unsigned short  rectyp;
125     unsigned long   typind;
126     unsigned long   off;
127     unsigned short  seg;
128 } DATASYM32;
129 typedef DATASYM32 PUBSYM32;
130
131 /*
132  * sstSegMap section
133  */
134
135 typedef struct OMFSegMapDesc
136 {
137     unsigned short  flags;
138     unsigned short  ovl;
139     unsigned short  group;
140     unsigned short  frame;
141     unsigned short  iSegName;
142     unsigned short  iClassName;
143     unsigned long   offset;
144     unsigned long   cbSeg;
145 } OMFSegMapDesc;
146
147 typedef struct OMFSegMap
148 {
149     unsigned short  cSeg;
150     unsigned short  cSegLog;
151     OMFSegMapDesc   rgDesc[0];
152 } OMFSegMap;
153
154
155 /*
156  * sstSrcModule section
157  */
158
159 typedef struct OMFSourceLine
160 {
161     unsigned short  Seg;
162     unsigned short  cLnOff;
163     unsigned long   offset[1];
164     unsigned short  lineNbr[1];
165 } OMFSourceLine;
166
167 typedef struct OMFSourceFile
168 {
169     unsigned short  cSeg;
170     unsigned short  reserved;
171     unsigned long   baseSrcLn[1];
172     unsigned short  cFName;
173     char            Name;
174 } OMFSourceFile;
175
176 typedef struct OMFSourceModule
177 {
178     unsigned short  cFile;
179     unsigned short  cSeg;
180     unsigned long   baseSrcFile[1];
181 } OMFSourceModule;
182