ruby-changes:38390
From: nobu <ko1@a...>
Date: Tue, 12 May 2015 15:50:09 +0900 (JST)
Subject: [ruby-changes:38390] nobu:r50471 (trunk): vm_dump.c: preface_dump
nobu 2015-05-12 15:49:51 +0900 (Tue, 12 May 2015) New Revision: 50471 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=50471 Log: vm_dump.c: preface_dump * vm_dump.c (preface_dump): move platform specific preface. Modified files: trunk/vm_dump.c Index: vm_dump.c =================================================================== --- vm_dump.c (revision 50470) +++ vm_dump.c (revision 50471) @@ -936,6 +936,25 @@ rb_dump_machine_register(const ucontext_ https://github.com/ruby/ruby/blob/trunk/vm_dump.c#L936 # define rb_dump_machine_register(ctx) ((void)0) #endif /* HAVE_PRINT_MACHINE_REGISTERS */ +static void +preface_dump(void) +{ +#if defined __APPLE__ + static const char msg[] = "" + "-- 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" + " for more details.\n" + "\n"; + + fputs(msg, stderr); +#endif +} + void rb_vm_bugreport(const void *ctx) { @@ -949,18 +968,8 @@ rb_vm_bugreport(const void *ctx) https://github.com/ruby/ruby/blob/trunk/vm_dump.c#L968 #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" - " for more details.\n" - "\n", - stderr); -#endif + preface_dump(); + if (vm) { SDR(); rb_backtrace_print_as_bugreport(); -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/