gdb rsp: make start() rerunnable

Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
This commit is contained in:
2024-06-16 21:11:18 +05:30
parent c55f2937f7
commit 2c89701fee
2 changed files with 7 additions and 6 deletions

View File

@@ -38,12 +38,13 @@ be_to_le(std::string str) {
return current;
}
GdbRsp::GdbRsp(std::shared_ptr<Cpu> cpu)
: cpu(cpu) {}
GdbRsp::GdbRsp(std::shared_ptr<Cpu> cpu, uint port)
: cpu(cpu) {
server.start(port);
}
void
GdbRsp::start(const uint port) {
server.start(port);
GdbRsp::start() {
server.run();
attach();

View File

@@ -4,9 +4,9 @@
namespace matar {
class GdbRsp {
public:
GdbRsp(std::shared_ptr<Cpu> cpu);
GdbRsp(std::shared_ptr<Cpu> cpu, uint port);
~GdbRsp() = default;
void start(const uint port);
void start();
void attach();
void satisfy_client();
void step();