From 768689b9af9d44d79430094e5740cea109f31d0e Mon Sep 17 00:00:00 2001 From: Oleg Sukhodolsky Date: Sun, 5 Jul 2015 20:33:15 +0300 Subject: [PATCH] default (unset) value for stop_frame is -1 --- ext/ruby_debug/ruby_debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/ruby_debug/ruby_debug.c b/ext/ruby_debug/ruby_debug.c index 6b6a654..7a59a11 100644 --- a/ext/ruby_debug/ruby_debug.c +++ b/ext/ruby_debug/ruby_debug.c @@ -996,7 +996,7 @@ debug_event_hook(rb_event_flag_t event, VALUE data, VALUE self, ID mid, VALUE kl if(debug_context->stack_size == debug_context->stop_frame) { debug_context->stop_next = 1; - debug_context->stop_frame = 0; + debug_context->stop_frame = -1; /* NOTE: can't use call_at_line function here to trigger a debugger event. this can lead to segfault. We should only unroll the stack on this event. */