Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debugger: Restarting a block frame suspended in its final send may just continue #1268

Open
blairmcg opened this issue Jan 4, 2024 · 1 comment
Assignees
Labels

Comments

@blairmcg
Copy link
Contributor

blairmcg commented Jan 4, 2024

Sometimes restarting a block frame in the debugger may cause execution to just return from the block and continue.

To Reproduce

  1. Evaluate the following expression in a workspace:
#(#(1 1) #(3 4) #(4 5))
		do: [:pair | Transcript print: pair; cr. self assert: [pair first = pair second]]
  1. When the walkback occurs for the assertion failure, click Debug
  2. Click on the block frame, 3rd down. Note that pair argument has value #(3 4) and that and the first pair have been printed to the Transcript.
  3. Flip into Disassembly mode, note that the method contains no Break instructions (i.e. it is a release build)
  4. Debug/Restart
  5. Click on the block frame, 3rd down. Note the value of the pair argument is now #(4 5), and also that only this has been printed to the Transcript.
  6. In disassembly mode, note that the method still contains no Break instructions.
  7. Debug/Restart again

Expected behavior
The frame should have been restarted to reprocess #(3 4), but instead the block returned and the loop continued to the next pair. We'd also have expected the method to have been translated to a debug method at step 5.

Additional context

I've been noticing this bug a lot while working on Dolphin 8, and had lumped it in with other resulting from compiler changes that have broken the release->debug ip mapping, but the bug is also present in Dolphin 7.1 and X6. In fact I had to go back to Dolphin 5 to find a version that worked as expected. The bug is somehow related to the conversion of frames from release to debug, as (aside from in X6) it does not occur if the expression is started with 'Debug It' and then continued so that the block frame is already a debug frame when later restarted. Also it does not seem to occur unless the frame is suspended in the final message send in the block.

@blairmcg blairmcg added the bug label Jan 4, 2024
@blairmcg blairmcg self-assigned this Jan 4, 2024
@blairmcg
Copy link
Contributor Author

blairmcg commented Jan 6, 2024

May be related to or a duplicate of #281

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant