1 #ifndef AVR_GDBSERVER_H
2 #define AVR_GDBSERVER_H
12 class SimulationClock
;
14 class GdbException
: public util::Exception
{
16 GdbException() : Exception("Gdb Exception") {}
17 GdbException(const char * msg
) : Exception(msg
) {}
18 GdbException(const std::string
& msg
) : Exception(msg
) {}
23 GdbServer(SimulationClock
& clock
, int port
= 1234);
27 void add(Device
*dev
);
31 void openSocket(int port
);
37 int preParsePacket(bool blocking
= false);
38 int parsePacket( char *pkt
);
39 void setBlockingMode( bool blocking
);
42 void sendPosition(int signo
);
44 void write( const void *buf
, size_t count
);
46 void sendReply( char *reply
);
47 void saveLastReply( char *reply
);
50 void queryPacket( char *pkt
);
52 void writeRegisters( char *pkt
);
53 void readRegister( char *pkt
);
54 void writeRegister( char *pkt
);
55 void readMemory( char *pkt
);
56 void writeMemory( char *pkt
);
57 int getSignal( char *pkt
);
58 void breakPoint( char *pkt
);
61 SimulationClock
& clock
;
62 std::vector
<DebugInterface
*> devices
;
66 /* A buffer containing a agent expression. */
68 std::vector
<unsigned char> buf
;
75 /* Number of times this tracepoint should single-step
76 and collect additional data. */
79 /* Number of times this tracepoint should be hit before
83 /* Count of the number of times this tracepoint was taken, dumped
84 with the info, but not used for anything else. Useful for
85 seeing how many times you hit a tracepoint prior to the program
86 aborting, so you can back up to just before the abort. */
89 std::vector
<Tracepoint
> tracePoints
;
100 #endif /*AVR_GDBSERVER_H*/