Skip to content

AlwaysHalt tag on call to breakpoint built-in in BytecodeDSL interp#662

Open
OctaveLarose wants to merge 1 commit intooracle:masterfrom
OctaveLarose:breakpoint-truffle-debug-tag
Open

AlwaysHalt tag on call to breakpoint built-in in BytecodeDSL interp#662
OctaveLarose wants to merge 1 commit intooracle:masterfrom
OctaveLarose:breakpoint-truffle-debug-tag

Conversation

@OctaveLarose
Copy link
Contributor

Allowing debugging with --inspect to break on calls to breakpoint in the BytecodeDSL interpreter

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Mar 3, 2026
Copy link
Contributor

@msimacek msimacek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. There's a bit of a difference that it would trigger even if you do just breakpoint and don't call it, but I guess it's fine, it's an approximation anyway. Do you think you could add a test for it in PythonDebugTest?

} else if (uses.contains(DefUse.GlobalImplicit)) {
if (scope.isFunction()) {
emitNameGlobalOperation(mangled, op, b, true);
if (mangled.equals(J_BREAKPOINT)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if it's not in in a function scope?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was me mirroring the original code which only emits a global op if within a function scope. But frankly, I don't understand why that is the case.

Should breakpoint be an exception to the rule and call emitNameGlobalOperation even if we're outside of a function?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants