diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-11-21 01:33:15 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-11-21 01:34:47 +0100 |
| commit | 0d88ce0e3e489db5f62f0097f9461df9ccb89913 (patch) | |
| tree | 9f649754096b0fb7bee9f9aa93985488beafb5b9 /dev/DebuggerKit | |
| parent | 56db5137ddd10f476b9820944b47ab72c6f8e019 (diff) | |
meta: Codebase improvements on CompilerKit.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'dev/DebuggerKit')
| -rw-r--r-- | dev/DebuggerKit/CommonCLI.inl | 2 | ||||
| -rw-r--r-- | dev/DebuggerKit/NeKernelContract.h | 3 | ||||
| -rw-r--r-- | dev/DebuggerKit/POSIXMachContract.h | 7 | ||||
| -rw-r--r-- | dev/DebuggerKit/Version.h | 6 | ||||
| -rw-r--r-- | dev/DebuggerKit/src/POSIXMachContractCLI.cc | 5 |
5 files changed, 13 insertions, 10 deletions
diff --git a/dev/DebuggerKit/CommonCLI.inl b/dev/DebuggerKit/CommonCLI.inl index a4f13ca..a118634 100644 --- a/dev/DebuggerKit/CommonCLI.inl +++ b/dev/DebuggerKit/CommonCLI.inl @@ -21,4 +21,4 @@ static DebuggerKit::POSIX::POSIXMachContract kDebugger; static DebuggerKit::ProcessID kPID = 0L; static DebuggerKit::CAddress kActiveAddress = nullptr; -static CompilerKit::STLString kPath = ""; +static CompilerKit::STLString kPath = ""; diff --git a/dev/DebuggerKit/NeKernelContract.h b/dev/DebuggerKit/NeKernelContract.h index 669ee1f..582741a 100644 --- a/dev/DebuggerKit/NeKernelContract.h +++ b/dev/DebuggerKit/NeKernelContract.h @@ -41,7 +41,8 @@ class NeKernelContract final DK_DEBUGGER_CONTRACT { NeKernelContract(const NeKernelContract&) = default; public: - bool Attach(CompilerKit::STLString path, CompilerKit::STLString arg_v, ProcessID& pid) noexcept override; + bool Attach(CompilerKit::STLString path, CompilerKit::STLString arg_v, + ProcessID& pid) noexcept override; bool BreakAt(CompilerKit::STLString symbol) noexcept override; bool Break() noexcept override; bool Continue() noexcept override; diff --git a/dev/DebuggerKit/POSIXMachContract.h b/dev/DebuggerKit/POSIXMachContract.h index 4c20d38..b1c0e0a 100644 --- a/dev/DebuggerKit/POSIXMachContract.h +++ b/dev/DebuggerKit/POSIXMachContract.h @@ -56,7 +56,8 @@ class POSIXMachContract final DK_DEBUGGER_CONTRACT { POSIXMachContract(const POSIXMachContract&) = default; public: - Bool Attach(CompilerKit::STLString path, CompilerKit::STLString argv, ProcessID& pid) noexcept override { + Bool Attach(CompilerKit::STLString path, CompilerKit::STLString argv, + ProcessID& pid) noexcept override { pid = fork(); if (pid == 0) { @@ -114,7 +115,7 @@ class POSIXMachContract final DK_DEBUGGER_CONTRACT { mach_vm_protect(task, (mach_vm_address_t) addr, sizeof(uint32_t), false, VM_PROT_READ | VM_PROT_WRITE | VM_PROT_EXECUTE); - + mach_vm_write(task, (mach_vm_address_t) addr, (vm_offset_t) &brk_inst, sizeof(addr)); return true; @@ -153,7 +154,7 @@ class POSIXMachContract final DK_DEBUGGER_CONTRACT { } private: - ProcessID m_pid{0}; + ProcessID m_pid{0}; CompilerKit::STLString m_path; }; } // namespace DebuggerKit::POSIX diff --git a/dev/DebuggerKit/Version.h b/dev/DebuggerKit/Version.h index d7e3985..8f3168a 100644 --- a/dev/DebuggerKit/Version.h +++ b/dev/DebuggerKit/Version.h @@ -1,8 +1,8 @@ -/* ------------------------------------------- +/* ======================================== - Copyright (C) 2025 Amlal EL Mahrouss, Licensed under Apache 2.0. + Copyright (C) 2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license. -------------------------------------------- */ +======================================== */ #pragma once diff --git a/dev/DebuggerKit/src/POSIXMachContractCLI.cc b/dev/DebuggerKit/src/POSIXMachContractCLI.cc index 5edd65e..22a626d 100644 --- a/dev/DebuggerKit/src/POSIXMachContractCLI.cc +++ b/dev/DebuggerKit/src/POSIXMachContractCLI.cc @@ -27,8 +27,9 @@ static void dbgi_ctrlc_handler(std::int32_t _) { } NECTI_MODULE(DebuggerMachPOSIX) { - pfd::notify("Debugger Event", - "Userland Debugger\n(C) 2025 Amlal El Mahrouss, Licensed under Apache 2.0."); + pfd::notify( + "Debugger Event", + "Userland Debugger\n(C) 2025 Amlal El Mahrouss, Licensed under the Apache 2.0 license."); if (argc >= 3 && std::string(argv[1]) == "-p" && argv[2] != nullptr) { kPath = argv[2]; |
