src/share/vm/utilities/vmError.cpp

changeset 9920
3a3803a0c789
parent 9896
1b8c45b8216a
child 9931
fd44df5e3bc3
equal deleted inserted replaced
9919:e8a0af9fc1cb 9920:3a3803a0c789
453 const char *p = strrchr(_filename, separator); 453 const char *p = strrchr(_filename, separator);
454 const char *file = p ? p+1 : _filename; 454 const char *file = p ? p+1 : _filename;
455 #else 455 #else
456 const char *file = _filename; 456 const char *file = _filename;
457 #endif 457 #endif
458 size_t len = strlen(file); 458 st->print(" (%s:%d)", file, _lineno);
459 size_t buflen = sizeof(buf);
460
461 strncpy(buf, file, buflen);
462 if (len + 10 < buflen) {
463 sprintf(buf + len, ":%d", _lineno);
464 }
465 st->print(" (%s)", buf);
466 } else { 459 } else {
467 st->print(" (0x%x)", _id); 460 st->print(" (0x%x)", _id);
468 } 461 }
469 } 462 }
470 463

mercurial