File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,11 @@ print_debug(const char *message, ...)
3535 va_end (ap );
3636}
3737
38+ inline int
39+ check_stop_frame (debug_context_t * context ) {
40+ return context -> calced_stack_size == context -> stop_frame && context -> calced_stack_size >= 0 ;
41+ }
42+
3843static VALUE
3944is_path_accepted (VALUE path ) {
4045 VALUE filter ;
@@ -358,7 +363,7 @@ process_line_event(VALUE trace_point, void *data)
358363 {
359364 context -> stop_next = 0 ;
360365 }
361- if (context -> calced_stack_size == context -> stop_frame )
366+ if (check_stop_frame ( context ) )
362367 {
363368 context -> stop_next = 0 ;
364369 context -> stop_frame = -1 ;
@@ -394,7 +399,7 @@ process_return_event(VALUE trace_point, void *data)
394399 /* it is important to check stop_frame after stack size updated
395400 if the order will be changed change Context_stop_frame accordingly.
396401 */
397- if (context -> calced_stack_size == context -> stop_frame )
402+ if (check_stop_frame ( context ) )
398403 {
399404 context -> stop_next = 1 ;
400405 context -> stop_frame = -1 ;
You can’t perform that action at this time.
0 commit comments