-static DbgSym* NewDbgSym (unsigned char Type, unsigned char AddrSize, ObjData* O)
+static DbgSym* NewDbgSym (unsigned Type, unsigned char AddrSize, ObjData* O)
/* Create a new DbgSym and return it */
{
/* Allocate memory */
/* Initialize the fields */
D->Next = 0;
- D->Flags = 0;
D->Obj = O;
D->LineInfos = EmptyCollection;
D->Expr = 0;
}
-
+
void PrintDbgSyms (FILE* F)
/* Print the debug symbols in a debug file */
-{
+{
unsigned I, J;
for (I = 0; I < CollCount (&ObjDataList); ++I) {
typedef struct DbgSym DbgSym;
struct DbgSym {
DbgSym* Next; /* Pool linear list link */
- unsigned Flags; /* Generic flags */
ObjData* Obj; /* Object file that exports the name */
Collection LineInfos; /* Line infos of definition */
ExprNode* Expr; /* Expression (0 if not def'd) */
- unsigned long Size; /* Symbol size if any */
+ unsigned Size; /* Symbol size if any */
unsigned OwnerId; /* Id of parent/owner */
unsigned Name; /* Name */
- unsigned char Type; /* Type of symbol */
- unsigned char AddrSize; /* Address size of symbol */
+ unsigned short Type; /* Type of symbol */
+ unsigned short AddrSize; /* Address size of symbol */
};
-static Export* NewExport (unsigned char Type, unsigned char AddrSize,
+static Export* NewExport (unsigned Type, unsigned char AddrSize,
unsigned Name, ObjData* Obj);
/* Create a new export and initialize it */
-static Export* NewExport (unsigned char Type, unsigned char AddrSize,
+static Export* NewExport (unsigned Type, unsigned char AddrSize,
unsigned Name, ObjData* Obj)
/* Create a new export and initialize it */
{
E->Expr = 0;
E->Size = 0;
E->LineInfos = EmptyCollection;
- E->Type = Type;
+ E->Type = Type | SYM_EXPORT;
E->AddrSize = AddrSize;
memset (E->ConDes, 0, sizeof (E->ConDes));
/* Create an export for a literal date */
{
/* Create a new export */
- Export* E = NewExport (SYM_CONST | SYM_EQUATE, ADDR_SIZE_ABS, Name, 0);
+ Export* E = NewExport (SYM_CONST|SYM_EQUATE, ADDR_SIZE_ABS, Name, 0);
/* Assign the value */
E->Expr = LiteralExpr (Value, 0);
/* Create an export for an expression */
{
/* Create a new export */
- Export* E = NewExport (SYM_EXPR | SYM_EQUATE, AddrSize, Name, 0);
+ Export* E = NewExport (SYM_EXPR|SYM_EQUATE, AddrSize, Name, 0);
/* Assign the value expression */
E->Expr = Expr;
Collection LineInfos; /* Line info of reference */
struct Export* Exp; /* Matching export for this import */
unsigned Name; /* Name if not in table */
- unsigned char Flags; /* Generic flags */
- unsigned char AddrSize; /* Address size of import */
+ unsigned short Flags; /* Generic flags */
+ unsigned short AddrSize; /* Address size of import */
};
unsigned ImpCount; /* How many imports for this symbol? */
Import* ImpList; /* List of imports for this symbol */
ExprNode* Expr; /* Expression (0 if not def'd) */
- unsigned long Size; /* Size of the symbol if any */
+ unsigned Size; /* Size of the symbol if any */
Collection LineInfos; /* Line info of definition */
- unsigned char Type; /* Type of export */
- unsigned char AddrSize; /* Address size of export */
+ unsigned short Type; /* Type of export */
+ unsigned short AddrSize; /* Address size of export */
unsigned char ConDes[CD_TYPE_COUNT]; /* Constructor/destructor decls */
};