quick fix to -f obj debug format - put "static" back in assemble.c

-
This commit is contained in:
Frank Kotler 2003-09-06 04:45:37 +00:00
parent a75b8018b2
commit abebb08083
2 changed files with 12 additions and 2 deletions

View File

@ -7,6 +7,7 @@
* Fix the STR instruction.
* Fix the ELF output format, which was broken under certain
circumstances due to the addition of stabs support.
* Quick-fix Borland format debug-info for -f obj
0.98.37
-------

View File

@ -105,8 +105,8 @@ static int chsize (operand *, int);
static void out (long offset, long segto, const void *data, unsigned long type,
long segment, long wrt)
{
long lineno;
char *lnfname = NULL;
static long lineno = 0; /* static!!! */
static char *lnfname = NULL;
if ((type & OUT_TYPMASK) == OUT_ADDRESS) {
if (segment != NO_SEG || wrt != NO_SEG) {
@ -143,6 +143,15 @@ static void out (long offset, long segto, const void *data, unsigned long type,
list->output (offset, data, type);
}
/*
* this call to src_get determines when we call the
* debug-format-specific "linenum" function
* it updates lineno and lnfname to the current values
* returning 0 if "same as last time", -2 if lnfname
* changed, and the amount by which lineno changed,
* if it did. thus, these variables must be static
*/
if (src_get(&lineno,&lnfname))
{
outfmt->current_dfmt->linenum(lnfname,lineno,segto);