1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* debug.c (ruby_set_debug_option): define always for binary

compatibility with debug env enabled binary.

* signal.c (ruby_enable_coredump): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2010-10-13 02:04:10 +00:00
parent 5ba5d4c889
commit 8022385ba4
4 changed files with 13 additions and 13 deletions

View file

@ -1,3 +1,10 @@
Wed Oct 13 11:04:03 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
* debug.c (ruby_set_debug_option): define always for binary
compatibility with debug env enabled binary.
* signal.c (ruby_enable_coredump): ditto.
Wed Oct 13 10:52:51 2010 Nobuyoshi Nakada <nobu@ruby-lang.org> Wed Oct 13 10:52:51 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
* include/ruby/ruby.h (ruby_executable_node): missing prototype. * include/ruby/ruby.h (ruby_executable_node): missing prototype.

View file

@ -136,7 +136,6 @@ ruby_debug_breakpoint(void)
/* */ /* */
} }
#ifdef RUBY_DEBUG_ENV
static void static void
set_debug_option(const char *str, int len, void *arg) set_debug_option(const char *str, int len, void *arg)
{ {
@ -161,4 +160,3 @@ ruby_set_debug_option(const char *str)
{ {
ruby_each_words(str, set_debug_option, 0); ruby_each_words(str, set_debug_option, 0);
} }
#endif

View file

@ -32,10 +32,7 @@ NODE *ruby_debug_print_node(int level, int debug_level, const char *header, cons
int ruby_debug_print_indent(int level, int debug_level, int indent_level); int ruby_debug_print_indent(int level, int debug_level, int indent_level);
void ruby_debug_breakpoint(void); void ruby_debug_breakpoint(void);
void ruby_debug_gc_check_func(void); void ruby_debug_gc_check_func(void);
#ifdef RUBY_DEBUG_ENV
void ruby_set_debug_option(const char *str); void ruby_set_debug_option(const char *str);
#endif
#if defined __GNUC__ && __GNUC__ >= 4 #if defined __GNUC__ && __GNUC__ >= 4
#pragma GCC visibility pop #pragma GCC visibility pop

View file

@ -1041,8 +1041,9 @@ ruby_sig_finalize(void)
} }
#ifdef RUBY_DEBUG_ENV
int ruby_enable_coredump = 0; int ruby_enable_coredump = 0;
#ifndef RUBY_DEBUG_ENV
#define ruby_enable_coredump 0
#endif #endif
/* /*
@ -1116,18 +1117,15 @@ Init_signal(void)
install_sighandler(SIGUSR2, sighandler); install_sighandler(SIGUSR2, sighandler);
#endif #endif
#ifdef RUBY_DEBUG_ENV if (!ruby_enable_coredump) {
if (!ruby_enable_coredump)
#endif
{
#ifdef SIGBUS #ifdef SIGBUS
install_sighandler(SIGBUS, sigbus); install_sighandler(SIGBUS, sigbus);
#endif #endif
#ifdef SIGSEGV #ifdef SIGSEGV
# ifdef USE_SIGALTSTACK # ifdef USE_SIGALTSTACK
rb_register_sigaltstack(GET_THREAD()); rb_register_sigaltstack(GET_THREAD());
# endif # endif
install_sighandler(SIGSEGV, (sighandler_t)sigsegv); install_sighandler(SIGSEGV, (sighandler_t)sigsegv);
#endif #endif
} }
#ifdef SIGPIPE #ifdef SIGPIPE