To: djgpp AT sun DOT soe DOT clarkson DOT edu Subject: Fixes for profiling bug Organization: Code Generation Technology, Fremont, CA Date: Tue, 09 Jun 92 14:06:20 -0700 From: "Thomas J. Merritt" Djgpp generates incorrect calling information when profiling. The following patch to /gnu/lib/mcount.c fixes the bug. TJ Merritt tjm AT netcom DOT com *** mcount106.c Tue Jun 9 12:05:36 1992 --- mcount.c Tue Jun 9 12:20:03 1992 *************** *** 91,99 **** } /* lob off another page of memory and initialize the new table */ m = (MTAB *)sbrk(sizeof(MTAB)); m->prev = mtab; mtab = m; - memset(m, 0, sizeof(MTAB)); m->calls[0].from = from; m->calls[0].to = to; m->calls[0].count = 1; --- 91,99 ---- } /* lob off another page of memory and initialize the new table */ m = (MTAB *)sbrk(sizeof(MTAB)); + memset(m, 0, sizeof(MTAB)); m->prev = mtab; mtab = m; m->calls[0].from = from; m->calls[0].to = to; m->calls[0].count = 1;