Mail Archives: djgpp/1992/06/09/17:38:04
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;
- Raw text -