From: Peter Johnson Date: Mon, 24 Sep 2001 21:44:28 +0000 (-0000) Subject: Save filename as well as line number for each symbol. X-Git-Tag: v0.1.0~297 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=902d9742888bdea50dde52d1355dcd85f6b42589;p=yasm Save filename as well as line number for each symbol. svn path=/trunk/yasm/; revision=224 --- diff --git a/libyasm/symrec.c b/libyasm/symrec.c index 779e03a1..2196638e 100644 --- a/libyasm/symrec.c +++ b/libyasm/symrec.c @@ -67,6 +67,7 @@ symrec_get_or_new(char *name, SymType type) Fatal(FATAL_NOMEM); rec->type = type; rec->value = 0; + rec->filename = strdup(filename); rec->line = line_number; rec->status = SYM_NOSTATUS; diff --git a/libyasm/symrec.h b/libyasm/symrec.h index 936c6728..fd2e5c38 100644 --- a/libyasm/symrec.h +++ b/libyasm/symrec.h @@ -38,7 +38,8 @@ typedef struct symrec_s { char *name; SymType type; SymStatus status; - int line; /* line symbol was first declared or used on */ + char *filename; /* file and line */ + int line; /* symbol was first declared or used on */ double value; } symrec; diff --git a/src/symrec.c b/src/symrec.c index 779e03a1..2196638e 100644 --- a/src/symrec.c +++ b/src/symrec.c @@ -67,6 +67,7 @@ symrec_get_or_new(char *name, SymType type) Fatal(FATAL_NOMEM); rec->type = type; rec->value = 0; + rec->filename = strdup(filename); rec->line = line_number; rec->status = SYM_NOSTATUS; diff --git a/src/symrec.h b/src/symrec.h index 936c6728..fd2e5c38 100644 --- a/src/symrec.h +++ b/src/symrec.h @@ -38,7 +38,8 @@ typedef struct symrec_s { char *name; SymType type; SymStatus status; - int line; /* line symbol was first declared or used on */ + char *filename; /* file and line */ + int line; /* symbol was first declared or used on */ double value; } symrec;