1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-09 06:29:38 +00:00

Handle the new symbol flags correctly. Changed - among other things - the

data types of members in the management structures.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5180 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
uz 2011-08-16 11:50:27 +00:00
parent 7323035a89
commit 11be5d6261
4 changed files with 16 additions and 18 deletions

View File

@ -72,7 +72,7 @@ static DbgSym* DbgSymPool[256];
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 */
@ -80,7 +80,6 @@ static DbgSym* NewDbgSym (unsigned char Type, unsigned char AddrSize, ObjData* O
/* Initialize the fields */
D->Next = 0;
D->Flags = 0;
D->Obj = O;
D->LineInfos = EmptyCollection;
D->Expr = 0;
@ -204,10 +203,10 @@ long GetDbgSymVal (const DbgSym* D)
}
void PrintDbgSyms (FILE* F)
/* Print the debug symbols in a debug file */
{
{
unsigned I, J;
for (I = 0; I < CollCount (&ObjDataList); ++I) {

View File

@ -62,15 +62,14 @@ struct Scope;
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 */
};

View File

@ -92,7 +92,7 @@ static Export** ExpPool = 0; /* Exports array */
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 */
@ -289,7 +289,7 @@ const LineInfo* GetImportPos (const Import* I)
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 */
{
@ -306,7 +306,7 @@ static Export* NewExport (unsigned char Type, unsigned char AddrSize,
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));
@ -486,7 +486,7 @@ Export* CreateConstExport (unsigned Name, long Value)
/* 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);
@ -504,7 +504,7 @@ Export* CreateExprExport (unsigned Name, ExprNode* Expr, unsigned char AddrSize)
/* 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;

View File

@ -67,8 +67,8 @@ struct Import {
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 */
};
@ -83,10 +83,10 @@ struct Export {
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 */
};