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:
@@ -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 */
|
/* Create a new DbgSym and return it */
|
||||||
{
|
{
|
||||||
/* Allocate memory */
|
/* Allocate memory */
|
||||||
@@ -80,7 +80,6 @@ static DbgSym* NewDbgSym (unsigned char Type, unsigned char AddrSize, ObjData* O
|
|||||||
|
|
||||||
/* Initialize the fields */
|
/* Initialize the fields */
|
||||||
D->Next = 0;
|
D->Next = 0;
|
||||||
D->Flags = 0;
|
|
||||||
D->Obj = O;
|
D->Obj = O;
|
||||||
D->LineInfos = EmptyCollection;
|
D->LineInfos = EmptyCollection;
|
||||||
D->Expr = 0;
|
D->Expr = 0;
|
||||||
|
|||||||
@@ -62,15 +62,14 @@ struct Scope;
|
|||||||
typedef struct DbgSym DbgSym;
|
typedef struct DbgSym DbgSym;
|
||||||
struct DbgSym {
|
struct DbgSym {
|
||||||
DbgSym* Next; /* Pool linear list link */
|
DbgSym* Next; /* Pool linear list link */
|
||||||
unsigned Flags; /* Generic flags */
|
|
||||||
ObjData* Obj; /* Object file that exports the name */
|
ObjData* Obj; /* Object file that exports the name */
|
||||||
Collection LineInfos; /* Line infos of definition */
|
Collection LineInfos; /* Line infos of definition */
|
||||||
ExprNode* Expr; /* Expression (0 if not def'd) */
|
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 OwnerId; /* Id of parent/owner */
|
||||||
unsigned Name; /* Name */
|
unsigned Name; /* Name */
|
||||||
unsigned char Type; /* Type of symbol */
|
unsigned short Type; /* Type of symbol */
|
||||||
unsigned char AddrSize; /* Address size of symbol */
|
unsigned short AddrSize; /* Address size of symbol */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -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);
|
unsigned Name, ObjData* Obj);
|
||||||
/* Create a new export and initialize it */
|
/* 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)
|
unsigned Name, ObjData* Obj)
|
||||||
/* Create a new export and initialize it */
|
/* Create a new export and initialize it */
|
||||||
{
|
{
|
||||||
@@ -306,7 +306,7 @@ static Export* NewExport (unsigned char Type, unsigned char AddrSize,
|
|||||||
E->Expr = 0;
|
E->Expr = 0;
|
||||||
E->Size = 0;
|
E->Size = 0;
|
||||||
E->LineInfos = EmptyCollection;
|
E->LineInfos = EmptyCollection;
|
||||||
E->Type = Type;
|
E->Type = Type | SYM_EXPORT;
|
||||||
E->AddrSize = AddrSize;
|
E->AddrSize = AddrSize;
|
||||||
memset (E->ConDes, 0, sizeof (E->ConDes));
|
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 an export for a literal date */
|
||||||
{
|
{
|
||||||
/* Create a new export */
|
/* 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 */
|
/* Assign the value */
|
||||||
E->Expr = LiteralExpr (Value, 0);
|
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 an export for an expression */
|
||||||
{
|
{
|
||||||
/* Create a new export */
|
/* 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 */
|
/* Assign the value expression */
|
||||||
E->Expr = Expr;
|
E->Expr = Expr;
|
||||||
|
|||||||
@@ -67,8 +67,8 @@ struct Import {
|
|||||||
Collection LineInfos; /* Line info of reference */
|
Collection LineInfos; /* Line info of reference */
|
||||||
struct Export* Exp; /* Matching export for this import */
|
struct Export* Exp; /* Matching export for this import */
|
||||||
unsigned Name; /* Name if not in table */
|
unsigned Name; /* Name if not in table */
|
||||||
unsigned char Flags; /* Generic flags */
|
unsigned short Flags; /* Generic flags */
|
||||||
unsigned char AddrSize; /* Address size of import */
|
unsigned short AddrSize; /* Address size of import */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -83,10 +83,10 @@ struct Export {
|
|||||||
unsigned ImpCount; /* How many imports for this symbol? */
|
unsigned ImpCount; /* How many imports for this symbol? */
|
||||||
Import* ImpList; /* List of imports for this symbol */
|
Import* ImpList; /* List of imports for this symbol */
|
||||||
ExprNode* Expr; /* Expression (0 if not def'd) */
|
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 */
|
Collection LineInfos; /* Line info of definition */
|
||||||
unsigned char Type; /* Type of export */
|
unsigned short Type; /* Type of export */
|
||||||
unsigned char AddrSize; /* Address size of export */
|
unsigned short AddrSize; /* Address size of export */
|
||||||
unsigned char ConDes[CD_TYPE_COUNT]; /* Constructor/destructor decls */
|
unsigned char ConDes[CD_TYPE_COUNT]; /* Constructor/destructor decls */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user