Skip to content

Conversation

lavendersprite
Copy link
Contributor

What's new

  • Adds two new functions to hc_DebuggerIf: subscribe and unsubscribe
  • Subscriptions allow specific events to be reported. If no subscriptions are made, no events will be reported. This is critical for efficiency.
  • Each event type has an associated subscribe struct, detailing the specifics. For example, memory watchpoints specify the address range and the operation type(s).
  • Execution events are now more specific: they report one of (a) every step; (b) all steps, but skipping interrupts; or (c) all steps, but skipping interrupts and subroutines.
  • Return events (i.e. step out) are a new event type, since it occurs after an instruction is executed rather than before. (For efficiency reasons, it seems best to invoke the callback immediately after the return instruction rather than immediately before the returned-to instruction on the following step.)
  • Changed memory and interrupt access flags from unsigned to uint8_t, since they seem very unlikely to ever have more than 4 possible values. Perhaps this is not a good idea -- please let me know.

Discussion

  • Does "subscription id" make sense, or should the frontend just give a userdata value that will be included in the event struct when the event is reported by the core? If no subscription ID, how do we expect the core to efficiently cancel specific subscriptions?

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

Successfully merging this pull request may close these issues.

1 participant