all repos — mgba @ 1541e6e0b060637cff5ff882fa24956f88dc3a35

mGBA Game Boy Advance Emulator

src/debugger/gdb-stub.h (view raw)

 1#ifndef GDB_STUB_H
 2#define GDB_STUB_H
 3
 4#include "debugger.h"
 5
 6#define GDB_STUB_MAX_LINE 1200
 7
 8enum GDBStubAckState {
 9	GDB_ACK_PENDING = 0,
10	GDB_ACK_RECEIVED,
11	GDB_NAK_RECEIVED,
12	GDB_ACK_OFF
13};
14
15struct GDBStub {
16	struct ARMDebugger d;
17
18	char line[GDB_STUB_MAX_LINE];
19	char outgoing[GDB_STUB_MAX_LINE];
20	enum GDBStubAckState lineAck;
21
22	int socket;
23	int connection;
24};
25
26void GDBStubCreate(struct GDBStub*);
27int GDBStubListen(struct GDBStub*, int port, uint32_t bindAddress);
28
29void GDBStubHangup(struct GDBStub*);
30void GDBStubShutdown(struct GDBStub*);
31
32void GDBStubUpdate(struct GDBStub*);
33
34#endif