summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-01-30 06:21:33 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-01-30 06:21:33 +0000
commit5efb130d3900dfb7fc577050eb5a6ef1c22eb78c (patch)
tree9a665fe929ec2f203f8cb149072ff0a90032318d
parente449d06f15a7b65b8f8bb1441dcad7c35f707b1f (diff)
vm_dump.c: important message first
* vm_dump.c (rb_vm_bugreport): show the most important message, Crash Report log information, first. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38990 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--test/ruby/test_rubyoptions.rb1
-rw-r--r--vm_dump.c24
3 files changed, 20 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index 15c800e965..9a0356bfd5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed Jan 30 15:21:30 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * vm_dump.c (rb_vm_bugreport): show the most important message, Crash
+ Report log information, first.
+
Wed Jan 30 15:00:05 2013 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
* array.c (rb_ary_bsearch): Raise TypeError on bad return from block
diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb
index c12ddb9f2e..cf42475633 100644
--- a/test/ruby/test_rubyoptions.rb
+++ b/test/ruby/test_rubyoptions.rb
@@ -485,6 +485,7 @@ class TestRubyOptions < Test::Unit::TestCase
%r(\A
-e:(?:1:)?\s\[BUG\]\sSegmentation\sfault\n
#{ Regexp.quote(RUBY_DESCRIPTION) }\n\n
+ (?:--\s(?:.+\n)*\n)?
--\sControl\sframe\sinformation\s-+\n
(?:c:.*\n)*
(?:
diff --git a/vm_dump.c b/vm_dump.c
index 292280c40f..930c7b799a 100644
--- a/vm_dump.c
+++ b/vm_dump.c
@@ -617,6 +617,19 @@ rb_vm_bugreport(void)
enum {other_runtime_info = 0};
#endif
const rb_vm_t *const vm = GET_VM();
+
+#if defined __APPLE__
+ fputs("-- Crash Report log information "
+ "--------------------------------------------\n"
+ " See Crash Report log file under the one of following:\n"
+ " * ~/Library/Logs/CrashReporter\n"
+ " * /Library/Logs/CrashReporter\n"
+ " * ~/Library/Logs/DiagnosticReports\n"
+ " * /Library/Logs/DiagnosticReports\n"
+ " the more detail of.\n"
+ "\n",
+ stderr);
+#endif
if (vm) {
SDR();
rb_backtrace_print_as_bugreport();
@@ -628,16 +641,7 @@ rb_vm_bugreport(void)
"-------------------------------------------\n");
{
-#if defined __APPLE__
- fprintf(stderr, "\n");
- fprintf(stderr,
- " See Crash Report log file under the one of following:\n"
- " * ~/Library/Logs/CrashReporter\n"
- " * /Library/Logs/CrashReporter\n"
- " * ~/Library/Logs/DiagnosticReports\n"
- " * /Library/Logs/DiagnosticReports\n"
- " the more detail of.\n");
-#elif HAVE_BACKTRACE
+#if HAVE_BACKTRACE
#define MAX_NATIVE_TRACE 1024
static void *trace[MAX_NATIVE_TRACE];
int n = backtrace(trace, MAX_NATIVE_TRACE);