Skip to content

Commit

Permalink
Fix misplaced show_line attribute
Browse files Browse the repository at this point in the history
Under the current position, show_line is assigned with a location
object and causes:

```
❯ exe/rdbg -e  'trace on;; quit!' target.rb
<NoMethodError: undefined method `+' for "target.rb:1:in `<main>'":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 `<main>'"]
```
  • Loading branch information
st0012 committed Jun 17, 2021
1 parent b7f1f6c commit 9b68b0e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions 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')
Expand Down

0 comments on commit 9b68b0e

Please sign in to comment.