Skip to content

Commit

Permalink
gdb rsp: make start() rerunnable
Browse files Browse the repository at this point in the history
Signed-off-by: Amneesh Singh <[email protected]>
  • Loading branch information
natto1784 committed Jun 16, 2024
1 parent c55f293 commit 2c89701
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
9 changes: 5 additions & 4 deletions src/gdb_rsp.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions src/gdb_rsp.hh
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 2c89701

Please sign in to comment.