Most stack straces don't need 3 digits worth of levels.

llvm-svn: 85575
This commit is contained in:
Dan Gohman 2009-10-30 02:45:10 +00:00
parent 32e1b1c169
commit b0cad70c24
1 changed files with 1 additions and 1 deletions

View File

@ -209,7 +209,7 @@ static void PrintStackTrace(void *) {
Dl_info dlinfo; Dl_info dlinfo;
dladdr(StackTrace[i], &dlinfo); dladdr(StackTrace[i], &dlinfo);
fprintf(stderr, "%-3d", i); fprintf(stderr, "%-2d", i);
const char* name = strrchr(dlinfo.dli_fname, '/'); const char* name = strrchr(dlinfo.dli_fname, '/');
if (name == NULL) fprintf(stderr, " %-*s", width, dlinfo.dli_fname); if (name == NULL) fprintf(stderr, " %-*s", width, dlinfo.dli_fname);