script_debug: expose decoded opcode and op_count in callback#144
Merged
sedited merged 3 commits intosedited:feature_script_debugfrom Mar 26, 2026
Merged
Conversation
005fd3a to
a633c0d
Compare
sedited
reviewed
Mar 26, 2026
Owner
sedited
left a comment
There was a problem hiding this comment.
Only a small comment to give here, lgtm otherwise.
|
|
||
| DEBUG_SCRIPT(stack, script, opcode_pos, altstack, vfExec.all_true()); | ||
| opcode = OP_INVALIDOPCODE; | ||
| DEBUG_SCRIPT(stack, script, opcode_pos, altstack, vfExec.all_true(), static_cast<uint8_t>(opcode), nOpCount); |
Owner
There was a problem hiding this comment.
Instead of changing the opcode on the line above here and on line 424, can you pass it directly to the debug step instead? I think it is prudent that we keep the changes to this file to an absolute minimum - ideally only to calls through the macro.
Keep the interpreter patch narrowly scoped so the debug hook extension stays easy to review and future upstream syncs remain low risk.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
DEBUG_SCRIPTfrom beforeGetOpto after opcode decoding andnOpCountupdateopcodeandop_countthroughScriptDebugFrameTests
test_script_debug: asserts opcode and op_count valuesDepends on #143.