all repos — mgba @ c19d1117f18da6a407ae8332a904004e9edf0677

mGBA Game Boy Advance Emulator

src/debugger/debugger.h (view raw)

 1#ifndef DEBUGGER_H
 2#define DEBUGGER_H
 3
 4#include "arm.h"
 5
 6enum DebuggerState {
 7	DEBUGGER_PAUSED,
 8	DEBUGGER_RUNNING,
 9	DEBUGGER_EXITING
10};
11
12struct DebugBreakpoint {
13	struct DebugBreakpoint* next;
14	int32_t address;
15};
16
17struct DebugMemoryShim {
18	struct ARMMemory d;
19	struct ARMMemory* original;
20
21	struct ARMDebugger* p;
22	struct DebugBreakpoint* watchpoints;
23};
24
25struct ARMDebugger {
26	enum DebuggerState state;
27	struct ARMCore* cpu;
28
29	char* lastCommand;
30	struct DebugBreakpoint* breakpoints;
31	struct DebugMemoryShim memoryShim;
32};
33
34void ARMDebuggerInit(struct ARMDebugger*, struct ARMCore*);
35void ARMDebuggerRun(struct ARMDebugger*);
36void ARMDebuggerEnter(struct ARMDebugger*);
37
38#endif