2 | 4 | 2 |
LF_MODIFIER | @index | attribute |
@index type index of the modified type
attribute const :1 const attribute.
volatile :1 volatile attribute.
unaligned :1 unaligned attribute.
reserved :13
2 | 4 | 4 | * |
LF_POINTER | @type | attribute | variant |
@type | Type index of object pointed to | |
attribute | Consists of five bit fields: | |
ptrtype | :5 | Ordinal specifying mode of pointer |
0 | Near | |
1 | Far | |
2 | Huge | |
3 | Based on segment (OBSOLETE) | |
4 | Based on value | |
5 | Based on segment of value (OBSOLETE) | |
6 | Based on address of symbol (OBSOLETE) | |
7 | Based on segment of symbol address (OBSOLETE) | |
8 | Based on type | |
9 | Based on self (OBSOLETE) | |
10 | Near 32 bit pointer | |
11 | Far 32 bit pointer | |
12 | 64 bit pointer | |
13-31 | Reserved | |
ptrmode | :3 | Ordinal specifying pointer mode |
0 | Pointer | |
1 | Reference | |
2 | Pointer to data member | |
3 | Pointer to method | |
4-7 | Reserved | |
isflat32 | :1 | True if 16:32 pointer |
volatile | :1 | True if pointer is volatile |
const | :1 | True if pointer is const |
unaligned | :1 | True if pointer is unaligned |
restrict | :1 | True if pointer is restricted |
unused | :19 | Unused and reserved |
variant | variant portion of the record, depending upon the pointer type | |
based on segment - Segment value | ||
based on type- Index of type followed by length-prefixed name | ||
based on self - Nothing | ||
based on symbol - Copy of symbol record including length field | ||
pointer to data member - Union specifying pointer to data member | ||
pointer to method- Union specifying pointer to method |
The union specifying the pointer to data member has the format:
4 | 2 |
@class | format |
class Type index of containing class
format 0 16:16 data for class with no virtual functions or virtual bases.
1 16:16 data for class with virtual functions.
2 16:16 data for class with virtual bases.
3 16:32 data for classes w/wo virtual functions and no virtual bases
4 16:32 data for class with virtual bases.
5 16:16 near method nonvirtual bases with single address point
6 16:16 near method nonvirtual bases with multiple address points
7 16:16 near method with virtual bases
8 16:16 far method nonvirtual bases with single address point
9 16:16 far method nonvirtual bases with multiple address points
10 16:16 far method with virtual bases
11 16:32 method nonvirtual bases with single address point
12 16:32 method nonvirtual bases with multiple address points
13 16:32 method with virtual bases
The pointer to data member and pointer to method have the following formats in memory. In the following descriptions of the format and value of the NULL pointer, * means any value. Ø (00) 16:16 pointer to data member for a class with no virtual functions or bases.2 |
mdisp |
mdisp Displacement to data. NULL is 0xffff
Ø (01) 16:16 pointer to data member for a class with virtual functions.2 |
mdisp |
mdisp Displacement to data. NULL is 0
Ø (02) 16:16 pointer to data member for a class with virtual bases.2 | 2 | 2 |
mdisp | pdisp | vdisp |
mdisp displacement to data
pdisp this pointer displacement to virtual base table pointer
vdisp displacement within virtual base table. NULL value is (,,0xffff)
Ø (03) 16:32 near pointer to data member for a class with and without virtual functions and no virtual bases4 |
mdisp |
mdisp Displacement to data. NULL is 0x80000000
Ø (04) 16:32 near pointer to data member for a class with virtual bases.4 | 4 | 4 |
mdisp | pdisp | vdisp |
mdisp displacement to data
pdisp this pointer displacement to virtual base table pointer
vdisp displacement within virtual base table. NULL value is (,,0xffffffff)
Ø (05) 16:16 pointer to near member function for a class with no virtual functions or bases and a single address point2 |
off |
off near address of method. NULL is 0
Ø (06) 16:32 pointer to near member function for a class with no virtual bases with multiple address points2 | 2 |
off | disp |
off offset of function
disp displacement of address point. NULL is (0,*)
Ø (07) 16:16 pointer to near member function for a class with virtual bases2 | 2 | 2 | 2 |
off | mdisp | pdisp | vdisp |
off offset of function
mdisp displacement to data
pdisp this pointer displacement to virtual base table pointer
vdisp displacement within virtual base table. NULL value is (0,*,*,*)
Ø (08) 16:16 pointer to far member function for a class with no virtual bases and a single address point2 | 2 |
off | seg |
off offset of function
disp displacement of address point. NULL is (0:0)
Ø (09) 16:16 pointer to far member function for a class with no virtual bases and multiple address points2 | 2 | 2 |
off | seg | disp |
off offset of function
seg segment of function
disp displacement of address point. NULL is (0:0,*)
Ø (10) 16:16 pointer to far member function for a class with virtual bases2 | 2 | 2 | 2 | 2 |
off | seg | mdisp | pdisp | vdisp |
off offset of function
seg segment of function
mdisp displacement to data
pdisp this pointer displacement to virtual base table pointer
vdisp displacement within virtual base table. NULL value is (0,*,*,*)
Ø (11) 16:32 pointer to member function for a class with no virtual bases and a single address point4 |
off |
off offset of function. NULL is 0L
Ø (012) 16:32 pointer to member function for a class with no virtual bases and multiple address points4 | 4 |
off | disp |
off offset of function
disp displacement of address point. NULL is (0L:0L)
Ø (13) 16:32 pointer to member function for a class with virtual bases4 | 4 | 4 | 4 |
off | mdisp | pdisp | vdisp |
off offset of function
mdisp displacement to data
pdisp this pointer displacement to virtual base table pointer
vdisp displacement within virtual base table. NULL value is (0L,*,*,*)
2 | 4 | 4 | * | * |
LF_ARRAY | @elemtype | @idxtype | length | name |
@elemtype Type index of each array element
@idxtype Type index of indexing variable
length Length of array in bytes
name Length-prefixed name of array
2 | 2 | 2 | 42 | 4 | 4 | * | * |
leaf | count | property | @field | @dList | @vshape | length | name |
leaf LF_CLASS or LF_STRUCTURE
count Number of elements in the class or structure. This count includes direct, virtual, and indirect virtual bases, and methods including overloads, data members, static data members, friends, and so on.
property Property bit field
packed :1 Structure is packed
ctor :1 Class has constructors and/or destructors
overops :1 Class has overloaded operators
isnested :1 Class is a nested class
cnested :1 Class contains nested classes
opassign :1 Class has overloaded assignment
opcast :1 Class has casting methods
fwdref :1 Class/structure is a forward (incomplete) reference
scoped :1 This is a scoped definition
reserved:8
@field Type index of the field list for this class.
@dList Type index of the derivation list. This is output by the compiler as 0x0000 and is filled in by the CVPACK utility to a LF_DERIVED record containing the type indices of those classes which immediately inherit the current class. A zero index indicates that no derivation information is available. A LF_NULL index indicates that the class is not inherited by other classes.
@vshape Type index of the virtual function table shape descriptor
length Numeric leaf specifying size in bytes of the structure
name Length-prefixed name this type
2 | 2 | 2 | 42 | * | * |
LF_UNION | count | property | @field | length | name |
count Number of fields in the union
property Property bit field.
@field Type index of field list.
length Numeric leaf specifying size in bytes of the union
name Length-prefixed name of union
2 | 2 | 2 | 4 | 4 | * |
LF_ENUM | count | property | @type | @fList | name |
count Number of enumerates
property Property bit field.
@type Underlying type of enum
@field Type index of field list.
name Length-prefixed name of enum
2 | 4 | 1 | 1 | 2 | 4 |
LF_PROCEDURE | @rvtype | call | reserved | #parms | @arglist |
@rvtype Type index of the value returned by the procedure
call Calling convention of the procedure
0 Near C (arguments pushed right to left, caller pops arguments)
1 Far C
2 Near pascal (arguments pushed left to right, callee pops arguments)
3 Far pascal
4 Near fastcall
5 Far fastcall
6 Reserved
7 Near stdcall
8 Far stdcall
9 Near syscall
10 Far syscall
11 This call
12 MIPS call
13 Generic
14-255 Reserved
#parms Number of parameters
@arglist Type index of argument list type record
2 | 4 | 4 | 4 | 1 | 1 | |
LF_MFUNCTION | @rvtype | @class | @this | call | res | -> |
2 | 4 | 4 |
#parms | @arglist | thisadjust |
@rvtype Type index of the value returned by the procedure
@class Type index of the containing class of the function
@this Type index of the this parameter of the member function. A type of void indicates that the member function is static and has no this parameter.
call Calling convention of the procedure. See Procedure description.
res Reserved. Must be emitted as zero.
#parms Number of parameters. This count does not include the this parameter.
arglist List of parameter specifiers. This list does not include the this parameter.
thisadjust Logical this adjustor for the method. Whenever a class element is referenced via the this pointer, thisadjust will be added to the resultant offset before referencing the element.
2 | 2 | 4 bits |
LF_VTSHAPE | count | descriptor |
repeated |
count Number of descriptors
descriptor A four-bit ordinal describing the entry in the virtual table
0 Near
1 Far
2 Thin
3 Address point displacement to outermost class. This is at entry[-1] from table address
4 Far pointer to metaclass descriptor. This is at entry[-2] from table address
5 Near32
6 Far32
7 - 15 Reserved
2 | 4 | * |
LF_COBOL0 | @parent | data |
@parent Type index of the parent type
data Data
2 | * |
LF_COBOL1 | data |
data Data
2 | 4 |
LF_BARRAY | @ type |
type Type of each element of the array
2 | 2 |
LF_LABEL | mode |
mode Addressing mode of the label
0 Near label
4 Far label
2 |
LF_NULL |
2 |
LF_NOTTRANS |
2 | 4 | 4 | * |
LF_DIMARRAY | @utype | @diminfo | name |
@utype Underlying type of the array
@diminfo Index of the type record containing the dimension information
name Length-prefixed name of the array
2 | 4 | 4 * count |
LF_VFTPATH | count | bases |
count Count of number of bases in the path to the virtual function table
bases Type indices of the base classes in the path
2 | 4 | 4 | 4 | * |
LF_PRECOMP | start | count | signature | name |
start Starting type index that is included. This number must correspond to the current type index in the current module
count count of the number of type indices included. After including the precompiled types, the type index must be start + count
signature Signature for the precompiled types being referencedbythis module. The signature will be checked against the signature in the S_OBJNAME symbol record and the LF_ENDPRECOMP type record contained in the $$TYPES table of the creator of the precompiled types. The signature check is used to detect recompilation of the supplier of the precompiled types without recompilation of all of the users of the precompiled types. The method for computing the signature is unspecified. It should be sufficiently robust to detect failures to recompile.
name Name of the module containing the precompiled types. This name must match the module name in the S_OBJNAME symbol emitted by the compiler for the object file containing the precompiled types.
2 | 4 |
LF_ENDPRECOMP | signature |
signature Signature of the precompiled types. The signatures in the S_OBJNAME symbol record, the LF_PRECOMP type record and this signature must match.
2 | 2 | 2 | 4 | 4 * count | * |
LF_OEM | OEM | recOEM | count | indices | data |
OEM Microsoft assigned OEM identifier
recOEM OEM assigned record identifier. These record identifiers are unique per assigned OEM.
count number of type indices that follow
indices Type indices
data remainder of type record.
2 | 4 | 4 | * |
LF_TYPESERVER | signature | age | name |
signature Signature of the PDB. The method of computing this signature is unspecified. The signature must be verified against the signature in the PDB by using the TypesQuerySignature API call.
age Age of program data base The method of computing this age is unspecified. The age must be verified against the age in the PDB by using the TypesQueryAge API call.
name Length prefixed full path name of program data base