2000-03-26 22:25:23 +02:00
|
|
|
/*
|
|
|
|
* CodeView 4 Debug format - declarations
|
|
|
|
*
|
|
|
|
* (based on cvinfo.h and cvexefmt.h from the Win32 SDK)
|
2002-03-10 00:29:33 +01:00
|
|
|
*
|
|
|
|
* Copyright 2000 John R. Sheets for Codeweavers
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
2000-03-26 22:25:23 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
#define sstModule 0x120
|
|
|
|
#define sstAlignSym 0x125
|
|
|
|
#define sstSrcModule 0x127
|
|
|
|
#define sstLibraries 0x128
|
|
|
|
#define sstGlobalSym 0x129
|
|
|
|
#define sstGlobalPub 0x12a
|
|
|
|
#define sstGlobalTypes 0x12b
|
|
|
|
#define sstSegMap 0x12d
|
|
|
|
#define sstFileIndex 0x133
|
|
|
|
#define sstStaticSym 0x134
|
|
|
|
|
|
|
|
#if 0
|
|
|
|
/* Old, crusty value */
|
|
|
|
#define S_PUB32 0x0203
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define S_PUB32 0x1009
|
|
|
|
|
|
|
|
#include "pshpack1.h"
|
|
|
|
|
|
|
|
/*
|
|
|
|
* CodeView headers
|
|
|
|
*/
|
|
|
|
|
2002-06-01 01:06:46 +02:00
|
|
|
typedef struct OMFSignature
|
2000-03-26 22:25:23 +02:00
|
|
|
{
|
|
|
|
char Signature[4];
|
|
|
|
long filepos;
|
|
|
|
} OMFSignature;
|
|
|
|
|
2002-06-01 01:06:46 +02:00
|
|
|
typedef struct OMFDirHeader
|
2000-03-26 22:25:23 +02:00
|
|
|
{
|
|
|
|
unsigned short cbDirHeader;
|
|
|
|
unsigned short cbDirEntry;
|
|
|
|
unsigned long cDir;
|
|
|
|
long lfoNextDir;
|
|
|
|
unsigned long flags;
|
|
|
|
} OMFDirHeader;
|
|
|
|
|
2002-06-01 01:06:46 +02:00
|
|
|
typedef struct OMFDirEntry
|
2000-03-26 22:25:23 +02:00
|
|
|
{
|
|
|
|
unsigned short SubSection;
|
|
|
|
unsigned short iMod;
|
|
|
|
long lfo;
|
|
|
|
unsigned long cb;
|
|
|
|
} OMFDirEntry;
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* sstModule subsection
|
|
|
|
*/
|
|
|
|
|
2002-06-01 01:06:46 +02:00
|
|
|
typedef struct OMFSegDesc
|
2000-03-26 22:25:23 +02:00
|
|
|
{
|
|
|
|
unsigned short Seg;
|
|
|
|
unsigned short pad;
|
|
|
|
unsigned long Off;
|
|
|
|
unsigned long cbSeg;
|
|
|
|
} OMFSegDesc;
|
|
|
|
|
|
|
|
/* Must chop off the OMFSegDesc* field, because we need to write this
|
|
|
|
* struct out to a file. If we write the whole struct out, we'll end up
|
|
|
|
* with (*OMFSegDesc), not (OMFSegDesc). See OMFModuleFull.
|
|
|
|
*/
|
2002-06-01 01:06:46 +02:00
|
|
|
typedef struct OMFModule
|
2000-03-26 22:25:23 +02:00
|
|
|
{
|
|
|
|
unsigned short ovlNumber;
|
|
|
|
unsigned short iLib;
|
|
|
|
unsigned short cSeg;
|
|
|
|
char Style[2];
|
|
|
|
} OMFModule;
|
|
|
|
|
|
|
|
/* Full version, with memory pointers, too. Use OMFModule for writing out to
|
|
|
|
* a file, and OMFModuleFull for reading. If offsetof() were available, we
|
|
|
|
* could use that instead.
|
|
|
|
*/
|
|
|
|
typedef struct OMFModuleFull
|
|
|
|
{
|
|
|
|
unsigned short ovlNumber;
|
|
|
|
unsigned short iLib;
|
|
|
|
unsigned short cSeg;
|
|
|
|
char Style[2];
|
|
|
|
OMFSegDesc *SegInfo;
|
|
|
|
char *Name;
|
|
|
|
} OMFModuleFull;
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* sstGlobalPub section
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* Header for symbol table.
|
|
|
|
*/
|
2002-06-01 01:06:46 +02:00
|
|
|
typedef struct OMFSymHash
|
2000-03-26 22:25:23 +02:00
|
|
|
{
|
|
|
|
unsigned short symhash;
|
|
|
|
unsigned short addrhash;
|
|
|
|
unsigned long cbSymbol;
|
|
|
|
unsigned long cbHSym;
|
|
|
|
unsigned long cbHAddr;
|
|
|
|
} OMFSymHash;
|
|
|
|
|
|
|
|
/* Symbol table entry.
|
|
|
|
*/
|
2002-06-01 01:06:46 +02:00
|
|
|
typedef struct DATASYM32
|
2000-03-26 22:25:23 +02:00
|
|
|
{
|
|
|
|
unsigned short reclen;
|
|
|
|
unsigned short rectyp;
|
|
|
|
unsigned long typind;
|
|
|
|
unsigned long off;
|
|
|
|
unsigned short seg;
|
|
|
|
} DATASYM32;
|
|
|
|
typedef DATASYM32 PUBSYM32;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* sstSegMap section
|
|
|
|
*/
|
|
|
|
|
|
|
|
typedef struct OMFSegMapDesc
|
|
|
|
{
|
|
|
|
unsigned short flags;
|
|
|
|
unsigned short ovl;
|
|
|
|
unsigned short group;
|
|
|
|
unsigned short frame;
|
|
|
|
unsigned short iSegName;
|
|
|
|
unsigned short iClassName;
|
|
|
|
unsigned long offset;
|
|
|
|
unsigned long cbSeg;
|
|
|
|
} OMFSegMapDesc;
|
|
|
|
|
|
|
|
typedef struct OMFSegMap
|
|
|
|
{
|
|
|
|
unsigned short cSeg;
|
|
|
|
unsigned short cSegLog;
|
2002-07-19 05:18:05 +02:00
|
|
|
/* OMFSegMapDesc rgDesc[0];*/
|
2000-03-26 22:25:23 +02:00
|
|
|
} OMFSegMap;
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* sstSrcModule section
|
|
|
|
*/
|
|
|
|
|
|
|
|
typedef struct OMFSourceLine
|
|
|
|
{
|
|
|
|
unsigned short Seg;
|
|
|
|
unsigned short cLnOff;
|
|
|
|
unsigned long offset[1];
|
|
|
|
unsigned short lineNbr[1];
|
|
|
|
} OMFSourceLine;
|
|
|
|
|
|
|
|
typedef struct OMFSourceFile
|
|
|
|
{
|
|
|
|
unsigned short cSeg;
|
|
|
|
unsigned short reserved;
|
|
|
|
unsigned long baseSrcLn[1];
|
|
|
|
unsigned short cFName;
|
|
|
|
char Name;
|
|
|
|
} OMFSourceFile;
|
|
|
|
|
|
|
|
typedef struct OMFSourceModule
|
|
|
|
{
|
|
|
|
unsigned short cFile;
|
|
|
|
unsigned short cSeg;
|
|
|
|
unsigned long baseSrcFile[1];
|
|
|
|
} OMFSourceModule;
|