mgba/src/debugger/gdb-stub.h

35 lines
595 B
C
Raw Normal View History

2014-02-01 11:05:10 +00:00
#ifndef GDB_STUB_H
#define GDB_STUB_H
#include "debugger.h"
2014-02-01 13:44:40 +00:00
#define GDB_STUB_MAX_LINE 1200
2014-02-01 11:05:10 +00:00
2014-02-01 12:10:22 +00:00
enum GDBStubAckState {
GDB_ACK_PENDING = 0,
GDB_ACK_RECEIVED,
GDB_NAK_RECEIVED,
GDB_ACK_OFF
};
2014-02-01 11:05:10 +00:00
struct GDBStub {
struct ARMDebugger d;
char line[GDB_STUB_MAX_LINE];
2014-02-01 12:10:22 +00:00
char outgoing[GDB_STUB_MAX_LINE];
enum GDBStubAckState lineAck;
2014-02-01 11:05:10 +00:00
int socket;
int connection;
};
void GDBStubCreate(struct GDBStub*);
int GDBStubListen(struct GDBStub*, int port, uint32_t bindAddress);
void GDBStubHangup(struct GDBStub*);
void GDBStubShutdown(struct GDBStub*);
void GDBStubUpdate(struct GDBStub*);
#endif