Debugger: Add mDebuggerRunFrame convenience function
Vicki Pfau vi@endrift.com
Sun, 11 Jun 2017 12:04:42 -0700
3 files changed,
9 insertions(+),
0 deletions(-)
M
include/mgba/internal/debugger/debugger.h
→
include/mgba/internal/debugger/debugger.h
@@ -113,6 +113,7 @@
struct mDebugger* mDebuggerCreate(enum mDebuggerType type, struct mCore*); void mDebuggerAttach(struct mDebugger*, struct mCore*); void mDebuggerRun(struct mDebugger*); +void mDebuggerRunFrame(struct mDebugger*); void mDebuggerEnter(struct mDebugger*, enum mDebuggerEntryReason, struct mDebuggerEntryInfo*); CXX_GUARD_END
M
src/debugger/debugger.c
→
src/debugger/debugger.c
@@ -97,6 +97,13 @@ return;
} } +void mDebuggerRunFrame(struct mDebugger* debugger) { + int32_t frame = debugger->core->frameCounter(debugger->core); + do { + mDebuggerRun(debugger); + } while (debugger->core->frameCounter(debugger->core) == frame); +} + void mDebuggerEnter(struct mDebugger* debugger, enum mDebuggerEntryReason reason, struct mDebuggerEntryInfo* info) { debugger->state = DEBUGGER_PAUSED; if (debugger->platform->entered) {