all repos — mgba @ 73d32e7cc700ced48b747cbbf3c57eaefd7b4643

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