Annotation of mstools/samples/sdktools/image/drwatson/include/cv.h, revision 1.1.1.1

1.1       root        1: /*++
                      2: 
                      3: 
                      4: Copyright (c) 1992  Microsoft Corporation
                      5: 
                      6: Module Name:
                      7: 
                      8:     cv.h
                      9: 
                     10: Abstract:
                     11: 
                     12:     This file contains all of the type definitions for accessing
                     13:     CODEVIEW data.
                     14: 
                     15: Author:
                     16: 
                     17:     Wesley A. Witt (wesw) 26-March-1992
                     18: 
                     19: Environment:
                     20: 
                     21:     Win32, User Mode
                     22: 
                     23: --*/
                     24: 
                     25: 
                     26: // Global Segment Info table
                     27: typedef struct _sgf {
                     28:     unsigned short      fRead   :1;
                     29:     unsigned short      fWrite  :1;
                     30:     unsigned short      fExecute:1;
                     31:     unsigned short      f32Bit  :1;
                     32:     unsigned short      res1    :4;
                     33:     unsigned short      fSel    :1;
                     34:     unsigned short      fAbs    :1;
                     35:     unsigned short      res2    :2;
                     36:     unsigned short      fGroup  :1;
                     37:     unsigned short      res3    :3;
                     38: } SGF;
                     39: 
                     40: typedef struct _sgi {
                     41:     SGF                 sgf;        // Segment flags
                     42:     unsigned short      iovl;       // Overlay number
                     43:     unsigned short      igr;        // Group index
                     44:     unsigned short      isgPhy;     // Physical segment index
                     45:     unsigned short      isegName;   // Index to segment name
                     46:     unsigned short      iclassName; // Index to segment class name
                     47:     unsigned long       doffseg;    // Starting offset inside physical segment
                     48:     unsigned long       cbSeg;      // Logical segment size
                     49: } SGI;
                     50: 
                     51: typedef struct _sgm {
                     52:     unsigned short      cSeg;       // number of segment descriptors
                     53:     unsigned short      cSegLog;    // number of logical segment descriptors
                     54: } SGM;
                     55: 
                     56: typedef struct OMFSignature {
                     57:     char            Signature[4];   // "NB08"
                     58:     long            filepos;        // offset in file
                     59: } OMFSignature;
                     60: 
                     61: typedef struct OMFDirHeader {
                     62:     unsigned short  cbDirHeader;    // length of this structure
                     63:     unsigned short  cbDirEntry;     // number of bytes in each directory entry
                     64:     unsigned long   cDir;           // number of directorie entries
                     65:     long            lfoNextDir;     // offset from base of next directory
                     66:     unsigned long   flags;          // status flags
                     67: } OMFDirHeader;
                     68: 
                     69: typedef struct OMFDirEntry {
                     70:     unsigned short  SubSection;     // subsection type (sst...)
                     71:     unsigned short  iMod;           // module index
                     72:     long            lfo;            // large file offset of subsection
                     73:     unsigned long   cb;             // number of bytes in subsection
                     74: } OMFDirEntry;
                     75: 
                     76: typedef struct OMFSegDesc {
                     77:     unsigned short  Seg;            // segment index
                     78:     unsigned short  pad;            // pad to maintain alignment
                     79:     unsigned long   Off;            // offset of code in segment
                     80:     unsigned long   cbSeg;          // number of bytes in segment
                     81: } OMFSegDesc;
                     82: 
                     83: typedef struct OMFModule {
                     84:     unsigned short  ovlNumber;      // overlay number
                     85:     unsigned short  iLib;           // library that the module was linked from
                     86:     unsigned short  cSeg;           // count of number of segments in module
                     87:     char            Style[2];       // debugging style "CV"
                     88:     OMFSegDesc      SegInfo[1];     // describes segments in module
                     89:     char            Name[];         // length prefixed module name padded to
                     90:                                     // long word boundary
                     91: } OMFModule;
                     92: 
                     93: typedef struct  OMFSymHash {
                     94:     unsigned short  symhash;        // symbol hash function index
                     95:     unsigned short  addrhash;       // address hash function index
                     96:     unsigned long   cbSymbol;       // length of symbol information
                     97:     unsigned long   cbHSym;         // length of symbol hash data
                     98:     unsigned long   cbHAddr;        // length of address hashdata
                     99: } OMFSymHash;
                    100: 
                    101: typedef unsigned long   CV_uoff32_t;
                    102: typedef unsigned short  CV_typ_t;
                    103: 
                    104: typedef struct DATASYM32 {
                    105:     unsigned short  reclen;     /* Record length */
                    106:     unsigned short  rectyp;     /* S_LDATA32, S_GDATA32, S_LTHREAD32,
                    107:                                    S_GTHREAD32 or S_PUB32 */
                    108:     CV_uoff32_t     off;
                    109:     unsigned short  seg;
                    110:     CV_typ_t        typind;     /* Type index */
                    111:     unsigned char   name[1];    /* Length-prefixed name */
                    112: } DATASYM32;
                    113: 
                    114: #define FileAlign(x) ((x & (p->optrs.optHdr->FileAlignment-1)) ? ((x & ~(p->optrs.optHdr->FileAlignment-1)) + p->optrs.optHdr->FileAlignment) : x)
                    115: #define SectionAlign(x) ((x & (p->optrs.optHdr->SectionAlignment-1)) ? ((x & ~(p->optrs.optHdr->SectionAlignment-1)) + p->optrs.optHdr->SectionAlignment) : x)
                    116: #define DWB(p) ((PBYTE)(p) + (-((long)(p)) & 3))
                    117: #define NextMod(m) (OMFModule *)DWB((PUCHAR)((PUCHAR)m+sizeof(OMFModule)+m->Name[0]+1))
                    118: #define NextSym(m) (DATASYM32 *)DWB((PUCHAR)((PUCHAR)m+sizeof(DATASYM32)+m->name[0]+1))
                    119: #define S_PUB32      0x0203
                    120: #define sstModule    0x120
                    121: #define sstGlobalPub 0x12a
                    122: #define sstSegName   0x12e
                    123: #define sstSegMap    0x12d

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.