Skip to content

Adjust ThreadClient's frames management for nested subsessions#564

Closed
st0012 wants to merge 2 commits intoruby:masterfrom
st0012:fix-#563
Closed

Adjust ThreadClient's frames management for nested subsessions#564
st0012 wants to merge 2 commits intoruby:masterfrom
st0012:fix-#563

Conversation

@st0012
Copy link
Member

@st0012 st0012 commented Mar 13, 2022

Fixes #563

❯ exe/rdbg -e 'b Foo.bar ;; c ;; bt ;; Foo.bar(10) ;; bt ;; c ;; bt' target.rb
[1, 7] in target.rb
=>   1| class Foo
     2|   def self.bar(num)
     3|     num
     4|   end
     5| end
     6|
     7| binding.b
=>#0    <main> at target.rb:1
(rdbg:commands) b Foo.bar
uninitialized constant Foo

Foo
^^^
#0  BP - Method (pending)  Foo.bar
(rdbg:commands) c
DEBUGGER:  BP - Method  Foo.bar at target.rb:2 is activated.
[2, 7] in target.rb
     2|   def self.bar(num)
     3|     num
     4|   end
     5| end
     6|
=>   7| binding.b
=>#0    <main> at target.rb:7
(rdbg:commands) bt
=>#0    <main> at target.rb:7
(rdbg:commands) Foo.bar(10)
[1, 7] in target.rb
     1| class Foo
     2|   def self.bar(num)
=>   3|     num
     4|   end
     5| end
     6|
     7| binding.b
=>#0    Foo.bar(num=10) at target.rb:3
  #1    <main> at (rdbg)/target.rb:1
  # and 3 frames (use `bt' command for all frames)

Stop by #0  BP - Method  Foo.bar at target.rb:2
(rdbg:commands) bt
=>#0    Foo.bar(num=10) at target.rb:3
  #1    <main> at (rdbg)/target.rb:1
  #2    [C] Binding#eval at ~/projects/debug/lib/debug/thread_client.rb:401
  #3    TracePoint.allow_reentry at <internal:trace_point>:151
  #4    <main> at target.rb:7
(rdbg:commands) c
10
(rdbg:commands) bt
=>#0    <main> at target.rb:7
(rdbg) c    # continue command

@st0012 st0012 force-pushed the fix-#563 branch 2 times, most recently from 9e76c3c to 20bb999 Compare March 15, 2022 09:59
@ko1
Copy link
Collaborator

ko1 commented Mar 20, 2022

fix with #575

@ko1 ko1 closed this Mar 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Existing from nested breakpoint doesn't resume to the correct frame

2 participants