diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..cf29b6c --- /dev/null +++ b/.clang-format @@ -0,0 +1,4 @@ +--- +BasedOnStyle: Google + +... diff --git a/.clangd b/.clangd new file mode 100644 index 0000000..c786f16 --- /dev/null +++ b/.clangd @@ -0,0 +1,2 @@ +CompileFlags: + Add: [-xc++, -std=c++23, -Isrc/] \ No newline at end of file diff --git a/src/debug.hpp b/src/debug.hpp index 7b49d3e..b37d9dd 100644 --- a/src/debug.hpp +++ b/src/debug.hpp @@ -1,26 +1,29 @@ #pragma once -#include -#include -#include -#include -#include -#include -#include -#include -#include #include +#include #include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "vm.hpp" + class GDBStub { -public: + public: GDBStub(int port); ~GDBStub(); void run(); void stop(); -private: + private: int server_fd; int client_fd; std::atomic running; @@ -38,7 +41,8 @@ private: void handle_packet(const std::string &packet); - bool parse_memory_request(const std::string &packet, size_t &addr, size_t &length); + bool parse_memory_request(const std::string &packet, size_t &addr, + size_t &length); std::string read_registers();