mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-21 10:42:07 +00:00
Save location information of symbol definitions
Now, object files save the file name and line number where each global symbol is defined. Signed-off-by: Antonio Niño Díaz <antonio_nd@outlook.com>
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#include <time.h>
|
||||
|
||||
#include "asm/asm.h"
|
||||
#include "asm/fstack.h"
|
||||
#include "asm/symbol.h"
|
||||
#include "asm/main.h"
|
||||
#include "asm/mymath.h"
|
||||
@@ -109,6 +110,8 @@ createsymbol(char *s)
|
||||
(*ppsym)->pMacro = NULL;
|
||||
(*ppsym)->pSection = NULL;
|
||||
(*ppsym)->Callback = NULL;
|
||||
strcpy((*ppsym)->tzFileName, tzCurrentFileName);
|
||||
(*ppsym)->nFileLine = fstk_GetLine();
|
||||
return (*ppsym);
|
||||
} else {
|
||||
fatalerror("No memory for symbol");
|
||||
|
||||
Reference in New Issue
Block a user