Skip to content

Conversation

@dkcumming
Copy link
Collaborator

Closes #789

In particular adds:

  • --break-on-instrinsic-calls breaks on calling Intrinsics
  • --break-on-function-calls breaks on calling Functions
  • --break-on-thunks breaks on thunk
  • --break-every-statement breaks every MIR Statement
  • --break-every-terminator breaks every MIR Terminator
    • --break-on-terminator-goto breaks on calling TerminatorKind::Goto
    • --break-on-terminator-switch-int breaks on calling TerminatorKind::SwitchInt
    • --break-on-terminator-return breaks on calling TerminatorKind::Return
    • --break-on-terminator-call breaks on calling TerminatorKind::Call
    • --break-on-terminator-assert breaks on calling TerminatorKind::Assert
    • --break-on-terminator-drop breaks on calling TerminatorKind::Drop
    • --break-on-terminator-unreachable breaks on calling TerminatorKind::Unreachable
  • --break-every-step breaks every MIR Statement and Terminator

And --break-on-calls now breaks on instrinics and function calls at the Terminator call since it dumps #setUpCalleeData node after you can see the name of the intrinsic or function still

Copy link
Contributor

@Stevengre Stevengre left a comment

Choose a reason for hiding this comment

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

LGTM! The structure looks verbose, but I don't have a better way for now.

@automergerpr-permission-manager automergerpr-permission-manager bot merged commit c42d05d into master Oct 31, 2025
7 checks passed
@automergerpr-permission-manager automergerpr-permission-manager bot deleted the dc/more-cut-point-rules branch October 31, 2025 02:35
dkcumming added a commit that referenced this pull request Oct 31, 2025
@tothtamas28
Copy link
Contributor

The function could take break_on: Iterable[Breakpoint] where

class Breakpoint(Enum):
    INTRINSIC_CALLS = 'intrinsic-calls'
    FUNCTION_CALLS = 'function-calls'
    ...

    def cut_point_rules(self) -> list[str]:
        ...

The command line option then can be --break-on thunks,terminator-return --break-on terminator-drop ..., which can be easily parsed into a flat list[Breakpoint]. The cut_point_rules can be generated by flat-mapping the method with the same name on the iterable.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

More cut point rules

4 participants