Added a statement for every file load that prints the file path

of the cell.  This will greatly help in diagnosing issues when
reading cells from multiple locations including cwd, relative
paths, PDK libraries, and the search path.  Also:  Reworked
the timestamp update message so that it prints all at once at
the end of processing, not printing output for every cell
processed as it is being processed.  That prevents output from
the file read routine from getting interleaved with the
timestamp processing output.
This commit is contained in:
Tim Edwards 2023-04-15 10:44:50 -04:00
parent 1d8fcca09b
commit adf9a7703f
3 changed files with 36 additions and 10 deletions

View File

@ -1 +1 @@
8.3.389
8.3.390

View File

@ -1432,6 +1432,23 @@ dbReadOpen(cellDef, setFileName, dereference, errptr)
if (!strcmp(pptr, DBSuffix)) *pptr = '\0';
(void) StrDup(&cellDef->cd_file, filename);
if (DBVerbose >= DB_VERBOSE_ALL)
{
char *sptr = strrchr(filename, '/');
if (sptr == NULL)
TxPrintf("Cell %s read from current working directory\n",
cellDef->cd_name);
else
{
*sptr = '\0';
TxPrintf("Cell %s read from path %s\n", cellDef->cd_name, filename);
}
}
}
else if (DBVerbose >= DB_VERBOSE_WARN)
{
TxPrintf("Warning: Loaded cell %s but recorded file path is %s\n",
filename, cellDef->cd_file);
}
cellDef->cd_flags |= CDAVAILABLE;
return (f);

View File

@ -84,6 +84,10 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/
int timestamp;
typedef struct _celllist {
CellDef *cl_cell;
struct _celllist *cl_next;
} CellList;
/*
* ----------------------------------------------------------------------------
@ -107,9 +111,9 @@ DBFixMismatch()
{
CellDef *cellDef;
CellUse *parentUse;
CellList *cl = NULL, *clnew;
Rect oldArea, parentArea, tmp;
int redisplay;
int firstOne = TRUE;
Mismatch *tmpm;
/* It's very important to disable interrupts during this section!
@ -118,7 +122,7 @@ DBFixMismatch()
redisplay = FALSE;
if (mismatch == NULL) return;
TxPrintf("Processing timestamp mismatches:");
TxPrintf("Processing timestamp mismatches.\n");
SigDisableInterrupts();
for (tmpm = mismatch; tmpm; tmpm = tmpm->mm_next)
@ -174,15 +178,20 @@ DBFixMismatch()
redisplay = TRUE;
}
cellDef->cd_flags |= CDPROCESSED;
if (firstOne)
{
TxPrintf(" %s", cellDef->cd_name);
firstOne = FALSE;
}
else TxPrintf(", %s", cellDef->cd_name);
TxFlush(); /* This is needed to prevent _doprnt screwups */
clnew = (CellList *)mallocMagic(sizeof(CellList));
clnew->cl_cell = cellDef;
clnew->cl_next = cl;
cl = clnew;
}
SigEnableInterrupts();
TxPrintf("Timestamp mismatches found in these cells: ");
while (cl != NULL)
{
TxPrintf("%s", cl->cl_cell->cd_name);
if (cl->cl_next != NULL) TxPrintf(", ");
freeMagic(cl);
cl = cl->cl_next;
}
TxPrintf(".\n");
TxFlush();
if (redisplay) WindAreaChanged((MagWindow *) NULL, (Rect *) NULL);