FreeBSD/usr.sbin/pmcannotate/pmcannotate.c
/*
 * Printout the body of an "objdump -S" function.
 * It does simply stops when a new function is encountered,
 * bringing back the file position in order to not mess up
 * subsequent analysis.
 * It expect from the starting to the end to find, always, valid blocks
 * (see below for an explanation of the "block" concept).
 */
Printout the body of an "objdump -S" function.
It does simply stops when a new function is encountered,
bringing back the file position in order to not mess up
subsequent analysis.
It expect from the starting to the end to find, always, valid blocks
.
Printout the body of an " objdump - S " function . It does simply stops when a new function is encountered bringing back the file position in order to not mess up subsequent analysis . It expect from the starting to the end to find always valid blocks .
static int
general_printc(FILE *fp, struct aggent *agg)
{
	char buffer[LNBUFF];
	while (fgets(buffer, LNBUFF, fp) != NULL) {
		fseek(fp, strlen(buffer) * -1, SEEK_CUR);
		if (newfunction(buffer) != 0)
			break;
		if (printblock(fp, agg) == -1)
			return (-1);
	}
	return (0);
}
static int general_printc ( FILE * fp , struct aggent * agg ) { char buffer [ LNBUFF ] ; while ( fgets ( buffer , LNBUFF , fp ) != NULL ) { fseek ( fp , strlen ( buffer ) * -1 , SEEK_CUR ) ; if ( newfunction ( buffer ) != 0 ) break ; if ( printblock ( fp , agg ) == -1 ) return ( -1 ) ; } return ( 0 ) ; }
Printout the body of an "objdump -S" function.
Printout the body of an " objdump - S " function .