diff options
Diffstat (limited to 'src/core/debugger/gdbstub.h')
| -rw-r--r-- | src/core/debugger/gdbstub.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/core/debugger/gdbstub.h b/src/core/debugger/gdbstub.h index 368197920..232dcf49f 100644 --- a/src/core/debugger/gdbstub.h +++ b/src/core/debugger/gdbstub.h | |||
| @@ -12,13 +12,22 @@ | |||
| 12 | #include "core/debugger/debugger_interface.h" | 12 | #include "core/debugger/debugger_interface.h" |
| 13 | #include "core/debugger/gdbstub_arch.h" | 13 | #include "core/debugger/gdbstub_arch.h" |
| 14 | 14 | ||
| 15 | namespace Kernel { | ||
| 16 | class KProcess; | ||
| 17 | } | ||
| 18 | |||
| 19 | namespace Core::Memory { | ||
| 20 | class Memory; | ||
| 21 | } | ||
| 22 | |||
| 15 | namespace Core { | 23 | namespace Core { |
| 16 | 24 | ||
| 17 | class System; | 25 | class System; |
| 18 | 26 | ||
| 19 | class GDBStub : public DebuggerFrontend { | 27 | class GDBStub : public DebuggerFrontend { |
| 20 | public: | 28 | public: |
| 21 | explicit GDBStub(DebuggerBackend& backend, Core::System& system); | 29 | explicit GDBStub(DebuggerBackend& backend, Core::System& system, |
| 30 | Kernel::KProcess* debug_process); | ||
| 22 | ~GDBStub() override; | 31 | ~GDBStub() override; |
| 23 | 32 | ||
| 24 | void Connected() override; | 33 | void Connected() override; |
| @@ -42,8 +51,12 @@ private: | |||
| 42 | void SendReply(std::string_view data); | 51 | void SendReply(std::string_view data); |
| 43 | void SendStatus(char status); | 52 | void SendStatus(char status); |
| 44 | 53 | ||
| 54 | Kernel::KProcess* GetProcess(); | ||
| 55 | Core::Memory::Memory& GetMemory(); | ||
| 56 | |||
| 45 | private: | 57 | private: |
| 46 | Core::System& system; | 58 | Core::System& system; |
| 59 | Kernel::KProcess* debug_process; | ||
| 47 | std::unique_ptr<GDBStubArch> arch; | 60 | std::unique_ptr<GDBStubArch> arch; |
| 48 | std::vector<char> current_command; | 61 | std::vector<char> current_command; |
| 49 | std::map<VAddr, u32> replaced_instructions; | 62 | std::map<VAddr, u32> replaced_instructions; |