Add the parent scope/symbol to the debug symbol attributes.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5094 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -85,6 +85,7 @@ static DbgSym* NewDbgSym (unsigned char Type, unsigned char AddrSize, ObjData* O
|
||||
D->LineInfos = EmptyCollection;
|
||||
D->Expr = 0;
|
||||
D->Size = 0;
|
||||
D->Parent.Id = ~0UL;
|
||||
D->Name = 0;
|
||||
D->Type = Type;
|
||||
D->AddrSize = AddrSize;
|
||||
@@ -151,6 +152,9 @@ DbgSym* ReadDbgSym (FILE* F, ObjData* O)
|
||||
/* Create a new debug symbol */
|
||||
DbgSym* D = NewDbgSym (Type, AddrSize, O);
|
||||
|
||||
/* Read the id of the owner scope/symbol */
|
||||
D->Parent.Id = ReadVar (F);
|
||||
|
||||
/* Read and assign the name */
|
||||
D->Name = MakeGlobalStringId (O, ReadVar (F));
|
||||
|
||||
|
||||
@@ -55,6 +55,9 @@
|
||||
|
||||
|
||||
|
||||
/* Forwards */
|
||||
struct Scope;
|
||||
|
||||
/* Debug symbol structure */
|
||||
typedef struct DbgSym DbgSym;
|
||||
struct DbgSym {
|
||||
@@ -64,6 +67,11 @@ struct DbgSym {
|
||||
Collection LineInfos; /* Line infos of definition */
|
||||
ExprNode* Expr; /* Expression (0 if not def'd) */
|
||||
unsigned long Size; /* Symbol size if any */
|
||||
union {
|
||||
unsigned long Id; /* Id of parent while not resolved */
|
||||
struct Scope* Scope; /* Parent scope */
|
||||
struct DbgSym* Sym; /* Parent symbol for cheap locals */
|
||||
} Parent;
|
||||
unsigned Name; /* Name */
|
||||
unsigned char Type; /* Type of symbol */
|
||||
unsigned char AddrSize; /* Address size of symbol */
|
||||
|
||||
Reference in New Issue
Block a user