/* * customization: instruments data loads & stores; not I-fetches * * fflush'es are required when sending output to stdout due to * some sort of bug in Digital Unix 3.2 */ #pragma ident "@(#)$RCSfile: trace.anal.c,v $ $Revision: 1.1.2.2 $ (DEC) $Dat e: 1995/04/27 19:49:57 $" #include #include FILE *file; void OpenFile() { file = stdout; /* fopen("trace.out","wt"); */ assert(file != NULL); } void DataLoad(long address) { fprintf(file, "0 %lx\n", address); fflush(file); } void DataStore(long address) { fprintf(file, "1 %lx\n", address); fflush(file); } void CloseFile() { fclose(file); }