From 8e22d7bba8c2e0f875539c5e7a9a87e76fc23fa9 Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Sun, 26 Feb 2017 23:23:20 +0100 Subject: [PATCH] Bugfix: stop in debugger left it in unusable state This happened if the script was stopped in the debugger. Afterwards breakpoints were ignored. --- src/rba/rba.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/rba/rba.cc b/src/rba/rba.cc index 58c77bb35..336f607d4 100644 --- a/src/rba/rba.cc +++ b/src/rba/rba.cc @@ -1937,9 +1937,6 @@ trace_callback (VALUE /*data*/, rb_trace_arg_t *trace_arg) // see below for a description of s_block_exceptions d->block_exceptions = false; - int line = rb_sourceline (); - size_t file_id = prepare_trace (RubyInterpreter::instance (), rb_sourcefile ()); - RBA_TRY if (d->exit_on_next) { @@ -1947,9 +1944,15 @@ trace_callback (VALUE /*data*/, rb_trace_arg_t *trace_arg) } try { + + int line = rb_sourceline (); + size_t file_id = prepare_trace (RubyInterpreter::instance (), rb_sourcefile ()); + RubyStackTraceProvider st_provider (d->debugger_scope); d->current_exec_handler->trace (RubyInterpreter::instance (), file_id, line, &st_provider); + finish_trace (RubyInterpreter::instance ()); + } catch (...) { finish_trace (RubyInterpreter::instance ()); throw;