Skip to content

Move CoreDbg into Lua API #574

@Aurumaker72

Description

@Aurumaker72

Rationale

The CoreDbg GUI isn't useful.

Proposal Summary

We should instead just expose some debugger functionality functionality to Lua.

The basic idea is as follows:

---Calls the function `f` every instruction.
---If `unregister` is set to true, the function `f` will no longer be called when this event occurs, but it will error if you never registered the function.
---@param f fun(context: CPUContext): nil The function to be called every instruction.
---@param unregister boolean? If true, then unregister the function `f`.
---@return nil
function emu.atinstruction(f, unregister) end

---@return boolean # Whether the emulated processor is currently paused.
function coredbg.paused() end

---Pauses the emulated processor.
function coredbg.pause() end

---Resumes the emulated processor.
function coredbg.resume() end

---Resumes the emulated processor and advances it by one instruction, then pauses again.
function coredbg.step() end

Open Questions

No response

Technical Considerations

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    proposalThis issue contains a feature or change proposal.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions