diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-07-30 08:50:15 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-07-30 08:50:15 +0100 |
| commit | 1c8c5cff67b20d86c442b0917d6c1fc6407140df (patch) | |
| tree | 53ebea660bef14cdc2ff5b7ebefb4049f705f997 /dev/LibDebugger/src/NeKernelContractCLI.cc | |
| parent | 073811d89c98d6e1c078a032ca2eedefebf80384 (diff) | |
feat! Breaking API changes of NeCTI's LibCompiler and LibDebugger.
what:
- They've now become CompilerKit and DebuggerKit.
- Expanding XCoff for NeBoot PowerPC backend.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'dev/LibDebugger/src/NeKernelContractCLI.cc')
| -rw-r--r-- | dev/LibDebugger/src/NeKernelContractCLI.cc | 101 |
1 files changed, 0 insertions, 101 deletions
diff --git a/dev/LibDebugger/src/NeKernelContractCLI.cc b/dev/LibDebugger/src/NeKernelContractCLI.cc deleted file mode 100644 index 25e9c13..0000000 --- a/dev/LibDebugger/src/NeKernelContractCLI.cc +++ /dev/null @@ -1,101 +0,0 @@ -/*** - LibDebugger - (C) 2025 Amlal El Mahrouss - File: NeKernelContract.cc - Purpose: NeKernel Debugger CLI. -*/ - -#ifdef LD_NEKERNEL_DEBUGGER - -#include <LibCompiler/Defines.h> -#include <LibDebugger/NeKernelContract.h> -#include <Vendor/Dialogs.h> -#include <string> - -#include <LibDebugger/CommonCLI.inl> - -using namespace LibDebugger::NeKernel; - -static void dbgi_ctrlc_handler(std::int32_t _) { - if (!kPID || kPath.empty()) { - return; - } - - kKernelDebugger.Break(); - - pfd::notify("Debugger Event", "BreakAt hit!"); - - kKeepRunning = false; -} - -LIBCOMPILER_MODULE(DebuggerNeKernel) { - pfd::notify("Debugger Event", - "Kernel Debugger\n(C) 2025 Amlal El Mahrouss, all rights reserved."); - - if (argc >= 5 && std::string(argv[1]) == "-k" && argv[2] != nullptr && - std::string(argv[3]) == "-ip" && argv[4] != nullptr) { - kPath = argv[2]; - kPath += ":"; - kPath += argv[4]; - - kStdOut << "[+] KIP (Kernel:IP) set to: " << kPath << "\n"; - - LibCompiler::install_signal(SIGINT, dbgi_ctrlc_handler); - - kKernelDebugger.Attach(kPath, "", kPID); - kKernelDebugger.BreakAt("$HANDOVER_START"); - - while (YES) { - if (kKeepRunning) { - continue; - } - - std::string cmd; - if (!std::getline(std::cin, cmd)) break; - - if (cmd == "c" || cmd == "cont" || cmd == "continue") { - if (kKernelDebugger.Continue()) { - kKeepRunning = true; - - kStdOut << "[+] Continuing...\n"; - - pfd::notify("Debugger Event", "Continuing..."); - } - } - - if (cmd == "d" || cmd == "detach") kKernelDebugger.Detach(); - - if (cmd == "start") { - kStdOut << "[?] Enter a argument to use: "; - std::getline(std::cin, cmd); - - kKernelDebugger.Attach(kPath, cmd, kPID); - } - - if (cmd == "exit") { - if (kPID > 0) kKernelDebugger.Detach(); - - break; - } - - if (cmd == "break" || cmd == "b") { - kStdOut << "[?] Enter a symbol to break on: "; - - std::getline(std::cin, cmd); - - if (kKernelDebugger.BreakAt(cmd)) { - pfd::notify("Debugger Event", "Add BreakAt at: " + cmd); - } - } - } - - return EXIT_SUCCESS; - } - - kStdOut << "Usage: " << argv[0] << " -k <kernel_path> -ip <ip4>\n"; - kStdOut << "Example: " << argv[0] << " -k /path/to/ne_kernel -ip 127.0.0.1\n"; - - return EXIT_FAILURE; -} - -#endif // LD_NEKERNEL_DEBUGGER
\ No newline at end of file |
