summaryrefslogtreecommitdiff
path: root/vm_dump.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-05-12 07:22:57 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-05-12 07:22:57 (GMT)
commit4ce15bf491bf119c67a3469b4a4bbee42f0457e1 (patch)
tree3d38895f696dc2697dba35e216eeedbee3a6f365 /vm_dump.c
parent7f2c079e46b92352581220e4cff94c19409c0c9a (diff)
vm_dump.c: statement for crash report log
* vm_dump.c (preface_dump): move the statement to include crash report log file from REPORTBUG_MSG in error.c. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_dump.c')
-rw-r--r--vm_dump.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/vm_dump.c b/vm_dump.c
index 7766c27..2c920b5 100644
--- a/vm_dump.c
+++ b/vm_dump.c
@@ -949,6 +949,7 @@ preface_dump(void)
" * ~/Library/Logs/DiagnosticReports\n"
" * /Library/Logs/DiagnosticReports\n"
" for more details.\n"
+ "Don't forget to include the above Crash Report log file in bug reports.\n"
"\n";
const char *const endmsg = msg + sizeof(msg) - 1;
const char *p = msg;
@@ -959,18 +960,14 @@ preface_dump(void)
if (isatty(fileno(stderr))) {
const char *e = strchr(p, '\n');
const int w = (int)(e - p);
- fputs(RED, stderr);
- fwrite(p, 1, w, stderr);
- fputs(RESET, stderr);
- fputc('\n', stderr);
- while ((p = e + 1) < endmsg && (e = strchr(p, '\n')) != 0 && e > p + 1) {
+ do {
int i = (int)(e - p);
- fputs(GREEN, stderr);
+ fputs(*p == ' ' ? GREEN : RED, stderr);
fwrite(p, 1, e - p, stderr);
for (; i < w; ++i) fputc(' ', stderr);
fputs(RESET, stderr);
fputc('\n', stderr);
- }
+ } while ((p = e + 1) < endmsg && (e = strchr(p, '\n')) != 0 && e > p + 1);
}
fwrite(p, 1, endmsg - p, stderr);
#endif