From 9b68b0e0dc91d236141c7b9ad60371cb2384ac6b Mon Sep 17 00:00:00 2001 From: st0012 Date: Thu, 17 Jun 2021 18:26:47 +0800 Subject: [PATCH] Fix misplaced show_line attribute MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Under the current position, show_line is assigned with a location object and causes: ``` ❯ exe/rdbg -e 'trace on;; quit!' target.rb '":Thread::Backtrace::Location> ["/Users/st0012/projects/debug/lib/debug/thread_client.rb:257:in `show_src'", "/Users/st0012/projects/debug/lib/debug/thread_client.rb:163:in `on_suspend'", "/Users/st0012/projects/debug/lib/debug/thread_client.rb:140:in `on_breakpoint'", "/Users/st0012/projects/debug/lib/debug/breakpoint.rb:50:in `suspend'", "/Users/st0012/projects/debug/lib/debug/breakpoint.rb:102:in `block in setup'", "target.rb:1:in `
'"] ``` --- lib/debug/frame_info.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/debug/frame_info.rb b/lib/debug/frame_info.rb index ce77c3f93..1bc6f63c8 100644 --- a/lib/debug/frame_info.rb +++ b/lib/debug/frame_info.rb @@ -1,9 +1,8 @@ module DEBUGGER__ FrameInfo = Struct.new(:location, :self, :binding, :iseq, :class, :frame_depth, - :has_return_value, :return_value, - :has_raised_exception, :raised_exception, - :show_line) + :has_return_value, :return_value, :show_line, + :has_raised_exception, :raised_exception) # extend FrameInfo with debug.so if File.exist? File.join(__dir__, 'debug.so')