]> git.sur5r.net Git - cc65/commitdiff
Debug symbolid for each symbol that goes into the debug symbol output.
authoruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Tue, 17 Aug 2010 20:11:27 +0000 (20:11 +0000)
committeruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Tue, 17 Aug 2010 20:11:27 +0000 (20:11 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@4811 b7a2c559-68d2-44c3-8de9-860c34a00d81

src/ca65/symentry.c
src/ca65/symentry.h
src/ca65/symtab.c

index cc6bfff6cee500a77812220d3b4adc8a07669982..0603f16b575c19aef78bb42d23360a47a3232132 100644 (file)
@@ -90,6 +90,7 @@ SymEntry* NewSymEntry (const StrBuf* Name, unsigned Flags)
         S->GuessedUse[I] = 0;
     }
     S->Flags             = Flags;
+    S->DebugSymId = ~0U;
     S->ImportId   = ~0U;
     S->Expr       = 0;
     S->ExprRefs   = AUTO_COLLECTION_INITIALIZER;
index ffe08e41eba9a1f972291a8cec7064dc81c83529..01a4af2fb1e19b3a0b6deeb429a5101682f07916 100644 (file)
@@ -94,7 +94,8 @@ struct SymEntry {
                                          * addressing
                                          */
     unsigned            Flags;         /* Symbol flags */
-    unsigned                   ImportId;       /* Id if imported symbol */
+    unsigned            DebugSymId;     /* Debug symbol id */
+    unsigned                   ImportId;       /* Id of import if this is one */
     struct ExprNode*    Expr;          /* Symbol expression */
     Collection          ExprRefs;       /* Expressions using this symbol */
     unsigned char       ExportSize;     /* Export address size */
index d87661a61ce817d87c2421852471dba3a32e8d4f..aed5c4a44d685792fe06072eac4541af91b08c4c 100644 (file)
@@ -780,12 +780,12 @@ void WriteDbgSyms (void)
     /* Check if debug info is requested */
     if (DbgSyms) {
 
-       /* Walk through the list and count the symbols */
+       /* Walk through the list, give each symbol an id and count them */
        Count = 0;
        S = SymList;
        while (S) {
            if ((S->Flags & SF_DBGINFOMASK) == SF_DBGINFOVAL) {
-               ++Count;
+                S->DebugSymId = Count++;
            }
            S = S->List;
        }
@@ -856,5 +856,3 @@ void WriteScopes (void)
 
 
 
-
-