Changeset View
Changeset View
Standalone View
Standalone View
usr.bin/gprof/gprof.c
Show First 20 Lines • Show All 155 Lines • ▼ Show 20 Lines | # endif /* DEBUG */ | ||||
gmonname = (char *) malloc(strlen(a_outname)+6); | gmonname = (char *) malloc(strlen(a_outname)+6); | ||||
strcpy(gmonname, a_outname); | strcpy(gmonname, a_outname); | ||||
strcat(gmonname, ".gmon"); | strcat(gmonname, ".gmon"); | ||||
} | } | ||||
/* | /* | ||||
* get information from the executable file. | * get information from the executable file. | ||||
*/ | */ | ||||
if ((Kflag && kernel_getnfile(a_outname, &defaultEs) == -1) || | if ((Kflag && kernel_getnfile(a_outname, &defaultEs) == -1) || | ||||
(!Kflag && elf_getnfile(a_outname, &defaultEs) == -1 | (!Kflag && elf_getnfile(a_outname, &defaultEs) == -1)) | ||||
#ifdef WITH_AOUT | |||||
&& aout_getnfile(a_outname, &defaultEs) == -1 | |||||
#endif | |||||
)) | |||||
errx(1, "%s: bad format", a_outname); | errx(1, "%s: bad format", a_outname); | ||||
/* | /* | ||||
* sort symbol table. | * sort symbol table. | ||||
*/ | */ | ||||
qsort(nl, nname, sizeof(nltype), valcmp); | qsort(nl, nname, sizeof(nltype), valcmp); | ||||
/* | /* | ||||
* turn off default functions | * turn off default functions | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 423 Lines • Show Last 20 Lines |