pharo-spec / ScriptableDebugger

3 stars 12 forks source link

Correction of skipAssignment command that had wrong behaviour #20

Closed adri09070 closed 2 years ago

adri09070 commented 2 years ago

Fixes #19 In SindarinDebugger, when you wanted to skip an assignment with the skip method; it was assigning nil to the variable that was supposed to be assigned, while you'd expect it to completely skip the assignment so that the assigned variable keep the same value as before the assignment. Furthermore, to go over the assignment, the skipAssignmentNodeWith: was skipping an arbitrary number of bytes. As a result, sometimes, too many pc were skipped and some arguments were missing on the stack. In other cases, the replacement value that should have been assigned to the variable wasn't actually assigned.

To fix this, now, I've made a version skipAssignmentNodeCompletely that completely goes over the assignment by skipping the exact number of bytes there are in the bytecode that does the assignment. This version is used by default in the skip method. I've also fixed the skipAssignmentNodeWith: so that the assignment is really made but with a replacement value pushed on the stack instead of the value that should have been assigned.

adri09070 commented 2 years ago

Now that the skip command actually works, I think it could be integrated again to the StDebugger advanced steps toolbar. What do you think?

StevenCostiou commented 2 years ago

@MarcusDenker @estebanlm We do not have tests running for Sindarin? How can I configure them?