[前][次][番号順一覧][スレッド一覧]

ruby-changes:26938

From: nobu <ko1@a...>
Date: Wed, 30 Jan 2013 15:21:42 +0900 (JST)
Subject: [ruby-changes:26938] nobu:r38990 (trunk): vm_dump.c: important message first

nobu	2013-01-30 15:21:33 +0900 (Wed, 30 Jan 2013)

  New Revision: 38990

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=38990

  Log:
    vm_dump.c: important message first
    
    * vm_dump.c (rb_vm_bugreport): show the most important message, Crash
      Report log information, first.

  Modified files:
    trunk/ChangeLog
    trunk/test/ruby/test_rubyoptions.rb
    trunk/vm_dump.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 38989)
+++ ChangeLog	(revision 38990)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Wed Jan 30 15:21:30 2013  Nobuyoshi Nakada  <nobu@r...>
+
+	* 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@m...>
 
 	* array.c (rb_ary_bsearch): Raise TypeError on bad return from block
Index: vm_dump.c
===================================================================
--- vm_dump.c	(revision 38989)
+++ vm_dump.c	(revision 38990)
@@ -617,6 +617,19 @@ rb_vm_bugreport(void) https://github.com/ruby/ruby/blob/trunk/vm_dump.c#L617
     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) https://github.com/ruby/ruby/blob/trunk/vm_dump.c#L641
 	    "-------------------------------------------\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);
Index: test/ruby/test_rubyoptions.rb
===================================================================
--- test/ruby/test_rubyoptions.rb	(revision 38989)
+++ test/ruby/test_rubyoptions.rb	(revision 38990)
@@ -485,6 +485,7 @@ class TestRubyOptions < Test::Unit::Test https://github.com/ruby/ruby/blob/trunk/test/ruby/test_rubyoptions.rb#L485
       %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)*
       (?:

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]