Debugger: Add mDebuggerRunFrame convenience function

This commit is contained in:
Vicki Pfau 2017-06-11 12:04:42 -07:00
parent 70a6622a5c
commit 201da5adac
3 changed files with 9 additions and 0 deletions

View File

@ -128,6 +128,7 @@ Misc:
- GB Video: Improved video timings
- Core: List memory segments in the core
- Core: Move savestate creation time to extdata
- Debugger: Add mDebuggerRunFrame convenience function
0.5.2: (2016-12-31)
Bugfixes:

View File

@ -113,6 +113,7 @@ struct mDebugger {
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

View File

@ -97,6 +97,13 @@ void mDebuggerRun(struct mDebugger* debugger) {
}
}
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) {