Added cvdump tool to dump CodeView symbol information.
[wine/gsoc-2012-control.git] / tools / cvdump / cvinclude.h
blob2fd5112a707f635c263f62d4d1d54ff2639d0d12
1 /*
2 * CodeView 4 Debug format - declarations
4 * (based on cvinfo.h and cvexefmt.h from the Win32 SDK)
5 */
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
18 #if 0
19 /* Old, crusty value */
20 #define S_PUB32 0x0203
21 #endif
23 #define S_PUB32 0x1009
25 #include "pshpack1.h"
28 * CodeView headers
31 typedef struct OMFSignature
33 char Signature[4];
34 long filepos;
35 } OMFSignature;
37 typedef struct OMFDirHeader
39 unsigned short cbDirHeader;
40 unsigned short cbDirEntry;
41 unsigned long cDir;
42 long lfoNextDir;
43 unsigned long flags;
44 } OMFDirHeader;
46 typedef struct OMFDirEntry
48 unsigned short SubSection;
49 unsigned short iMod;
50 long lfo;
51 unsigned long cb;
52 } OMFDirEntry;
56 * sstModule subsection
59 typedef struct OMFSegDesc
61 unsigned short Seg;
62 unsigned short pad;
63 unsigned long Off;
64 unsigned long cbSeg;
65 } OMFSegDesc;
67 /* Must chop off the OMFSegDesc* field, because we need to write this
68 * struct out to a file. If we write the whole struct out, we'll end up
69 * with (*OMFSegDesc), not (OMFSegDesc). See OMFModuleFull.
71 typedef struct OMFModule
73 unsigned short ovlNumber;
74 unsigned short iLib;
75 unsigned short cSeg;
76 char Style[2];
77 } OMFModule;
79 /* Full version, with memory pointers, too. Use OMFModule for writing out to
80 * a file, and OMFModuleFull for reading. If offsetof() were available, we
81 * could use that instead.
83 typedef struct OMFModuleFull
85 unsigned short ovlNumber;
86 unsigned short iLib;
87 unsigned short cSeg;
88 char Style[2];
89 OMFSegDesc *SegInfo;
90 char *Name;
91 } OMFModuleFull;
95 * sstGlobalPub section
98 /* Header for symbol table.
100 typedef struct OMFSymHash
102 unsigned short symhash;
103 unsigned short addrhash;
104 unsigned long cbSymbol;
105 unsigned long cbHSym;
106 unsigned long cbHAddr;
107 } OMFSymHash;
109 /* Symbol table entry.
111 typedef struct DATASYM32
113 unsigned short reclen;
114 unsigned short rectyp;
115 unsigned long typind;
116 unsigned long off;
117 unsigned short seg;
118 } DATASYM32;
119 typedef DATASYM32 PUBSYM32;
122 * sstSegMap section
125 typedef struct OMFSegMapDesc
127 unsigned short flags;
128 unsigned short ovl;
129 unsigned short group;
130 unsigned short frame;
131 unsigned short iSegName;
132 unsigned short iClassName;
133 unsigned long offset;
134 unsigned long cbSeg;
135 } OMFSegMapDesc;
137 typedef struct OMFSegMap
139 unsigned short cSeg;
140 unsigned short cSegLog;
141 OMFSegMapDesc rgDesc[0];
142 } OMFSegMap;
146 * sstSrcModule section
149 typedef struct OMFSourceLine
151 unsigned short Seg;
152 unsigned short cLnOff;
153 unsigned long offset[1];
154 unsigned short lineNbr[1];
155 } OMFSourceLine;
157 typedef struct OMFSourceFile
159 unsigned short cSeg;
160 unsigned short reserved;
161 unsigned long baseSrcLn[1];
162 unsigned short cFName;
163 char Name;
164 } OMFSourceFile;
166 typedef struct OMFSourceModule
168 unsigned short cFile;
169 unsigned short cSeg;
170 unsigned long baseSrcFile[1];
171 } OMFSourceModule;