/*---------- headerfile for src/bdb.ddl ----------*/
/* alignment is 4 */

/*---------- structures ----------*/
struct address {  /* size 28 */
    unsigned long    rva;
    unsigned long    pa;
    unsigned short   size;
    int     flags;
    unsigned long    dataConst;
    unsigned long    structure;
    unsigned long    comment;
};

struct section {  /* size 44 */
    char    name[32];
    unsigned long    rva;
    unsigned long    size;
    int     flags;
};

struct xref {  /* size 16 */
    unsigned long    id;
    unsigned long    from_rva;
    unsigned long    to_rva;
    int     type;
};

struct code {  /* size 148 */
    unsigned long    rva;
    unsigned short   flags;
    char    mnemonic[16];
    char    dest[32];
    char    src[32];
    char    aux[32];
    int     mnemType;
    int     destType;
    int     srcType;
    int     auxType;
    unsigned long    destConst;
    unsigned long    srcConst;
    unsigned long    auxConst;
};

struct int_code {  /* size 108 */
    unsigned long    id;
    unsigned long    rva;
    int     size;
    char    lvalue[32];
    char    rvalue[64];
};

struct fin_code {  /* size 268 */
    unsigned long    id;
    unsigned long    rva;
    int     size;
    char    line[256];
};

struct export {  /* size 4 */
    unsigned long    rva;
};

struct import {  /* size 12 */
    int     library;
    int     type;
    unsigned long    rva;
};

struct lib {  /* size 76 */
    int     id;
    char    name[64];
    int     ver_hi;
    int     ver_lo;
};

struct string {  /* size 264 */
    unsigned long    rva;
    int     length;
    char    text[256];
};

struct name {  /* size 72 */
    unsigned long    rva;
    int     type;
    char    name[64];
};

struct comment {  /* size 264 */
    unsigned long    id;
    int     type;
    char    text[256];
};

struct function {  /* size 16 */
    unsigned long    id;
    unsigned long    rva;
    unsigned short   size;
    unsigned long    comment;
};

struct func_param {  /* size 48 */
    unsigned long    id;
    unsigned long    func;
    unsigned long    type;
    int     offset;
    char    name[32];
};

struct func_local {  /* size 48 */
    unsigned long    id;
    unsigned long    func;
    unsigned long    type;
    int     offset;
    char    name[32];
};

struct f_inline {  /* size 8 */
    unsigned long    id;
    unsigned long    type;
};

struct inline_type {  /* size 74 */
    unsigned long    id;
    char    name[64];
    unsigned long    rva;
    unsigned short   size;
};

struct structure {  /* size 38 */
    unsigned long    id;
    char    name[32];
    unsigned short   size;
};

struct struct_member {  /* size 48 */
    unsigned long    id;
    unsigned long    type;
    unsigned long    structure;
    int     order;
    char    name[32];
};

struct data_type {  /* size 40 */
    unsigned long    id;
    int     size;
    char    name[32];
};

struct constant {  /* size 40 */
    unsigned long    id;
    char    name[32];
    long    value;
};

struct seer_macro {  /* size 2088 */
    unsigned long    id;
    int     type;
    char    name[32];
    char    macro[2048];
};

/*---------- record names ----------*/
#define ADDRESS 1000L
#define SECTION 2000L
#define XREF 3000L
#define CODE 4000L
#define INT_CODE 5000L
#define FIN_CODE 6000L
#define EXPORT 7000L
#define IMPORT 8000L
#define LIB 9000L
#define STRING 10000L
#define NAME 11000L
#define COMMENT 12000L
#define FUNCTION 13000L
#define FUNC_PARAM 14000L
#define FUNC_LOCAL 15000L
#define F_INLINE 16000L
#define INLINE_TYPE 17000L
#define STRUCTURE 18000L
#define STRUCT_MEMBER 19000L
#define DATA_TYPE 20000L
#define CONSTANT 21000L
#define SEER_MACRO 22000L

/*---------- field names ----------*/
#define ADDRESS_RVA 1001L
#define PA 1002L
#define ADDRESS_SIZE 1003L
#define ADDRESS_FLAGS 1004L
#define DATACONST 1005L
#define ADDRESS_STRUCTURE 1006L
#define ADDRESS_COMMENT 1007L
#define SECTION_NAME 2001L
#define SECTION_RVA 2002L
#define SECTION_SIZE 2003L
#define SECTION_FLAGS 2004L
#define XREF_ID 3001L
#define FROM_RVA 3002L
#define TO_RVA 3003L
#define XREF_TYPE 3004L
#define CODE_RVA 4001L
#define CODE_FLAGS 4002L
#define MNEMONIC 4003L
#define DEST 4004L
#define SRC 4005L
#define AUX 4006L
#define MNEMTYPE 4007L
#define DESTTYPE 4008L
#define SRCTYPE 4009L
#define AUXTYPE 4010L
#define DESTCONST 4011L
#define SRCCONST 4012L
#define AUXCONST 4013L
#define INT_CODE_ID 5001L
#define INT_CODE_RVA 5002L
#define INT_CODE_SIZE 5003L
#define LVALUE 5004L
#define RVALUE 5005L
#define FIN_CODE_ID 6001L
#define FIN_CODE_RVA 6002L
#define FIN_CODE_SIZE 6003L
#define LINE 6004L
#define EXPORT_RVA 7001L
#define LIBRARY 8001L
#define IMPORT_TYPE 8002L
#define IMPORT_RVA 8003L
#define LIB_ID 9001L
#define LIB_NAME 9002L
#define VER_HI 9003L
#define VER_LO 9004L
#define STRING_RVA 10001L
#define LENGTH 10002L
#define STRING_TEXT 10003L
#define NAME_RVA 11001L
#define NAME_TYPE 11002L
#define NAME_NAME 11003L
#define COMMENT_ID 12001L
#define COMMENT_TYPE 12002L
#define COMMENT_TEXT 12003L
#define FUNCTION_ID 13001L
#define FUNCTION_RVA 13002L
#define FUNCTION_SIZE 13003L
#define FUNCTION_COMMENT 13004L
#define FUNC_PARAM_ID 14001L
#define FUNC_PARAM_FUNC 14002L
#define FUNC_PARAM_TYPE 14003L
#define FUNC_PARAM_OFFSET 14004L
#define FUNC_PARAM_NAME 14005L
#define FUNC_LOCAL_ID 15001L
#define FUNC_LOCAL_FUNC 15002L
#define FUNC_LOCAL_TYPE 15003L
#define FUNC_LOCAL_OFFSET 15004L
#define FUNC_LOCAL_NAME 15005L
#define F_INLINE_ID 16001L
#define F_INLINE_TYPE 16002L
#define INLINE_TYPE_ID 17001L
#define INLINE_TYPE_NAME 17002L
#define INLINE_TYPE_RVA 17003L
#define INLINE_TYPE_SIZE 17004L
#define STRUCTURE_ID 18001L
#define STRUCTURE_NAME 18002L
#define STRUCTURE_SIZE 18003L
#define STRUCT_MEMBER_ID 19001L
#define STRUCT_MEMBER_TYPE 19002L
#define STRUCT_MEMBER_STRUCTURE 19003L
#define ORDER 19004L
#define STRUCT_MEMBER_NAME 19005L
#define DATA_TYPE_ID 20001L
#define DATA_TYPE_SIZE 20002L
#define DATA_TYPE_NAME 20003L
#define CONSTANT_ID 21001L
#define CONSTANT_NAME 21002L
#define VALUE 21003L
#define SEER_MACRO_ID 22001L
#define SEER_MACRO_TYPE 22002L
#define SEER_MACRO_NAME 22003L
#define MACRO 22004L

/*---------- key names ----------*/

/*---------- sequence names ----------*/

/*---------- integer constants ----------*/
