summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2026-03-02 14:53:33 +0100
committerAmlal El Mahrouss <amlal@nekernel.org>2026-03-02 14:53:33 +0100
commit7d9fb7e4244d996f744233be046d9aa90afa8964 (patch)
treeeccd99f623291e4abe8bebb46936e035060eb6d8 /src
parentfe6ba8bd1a59f48000e7cd04a5f7ae10592dc25b (diff)
chore: GL improvements of pstd, and DebuggerKit tweaks.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'src')
-rw-r--r--src/DebuggerKit/src/MachContract.cpp (renamed from src/DebuggerKit/src/POSIXMachContractCLI.cpp)8
-rw-r--r--src/DebuggerKit/src/MachContractCLI.cpp4
2 files changed, 8 insertions, 4 deletions
diff --git a/src/DebuggerKit/src/POSIXMachContractCLI.cpp b/src/DebuggerKit/src/MachContract.cpp
index da90a1f..53553ac 100644
--- a/src/DebuggerKit/src/POSIXMachContractCLI.cpp
+++ b/src/DebuggerKit/src/MachContract.cpp
@@ -30,11 +30,15 @@ NECTAR_MODULE(DebuggerMachPOSIX) {
"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) {
+ constexpr auto kMaxArgs = 3;
+
+ if (argc >= kMaxArgs
+ && std::string(argv[1]) == "-p"
+ && argv[2] != nullptr) {
kPath = argv[2];
kUserDebugger.SetPath(kPath);
- kStdOut << "[+] Image set to: " << kPath << "\n";
+ kStdOut << "[+] Set image to: " << kPath << "\n";
} else {
kStdOut << "usage: " << argv[0] << " -p <path>\n";
kStdOut << "example: " << argv[0] << " -p </path/to/program>\n";
diff --git a/src/DebuggerKit/src/MachContractCLI.cpp b/src/DebuggerKit/src/MachContractCLI.cpp
index 4d0c4e8..63c5470 100644
--- a/src/DebuggerKit/src/MachContractCLI.cpp
+++ b/src/DebuggerKit/src/MachContractCLI.cpp
@@ -49,7 +49,8 @@ NECTAR_MODULE(DebuggerMachPOSIX) {
continue;
}
- std::string cmd;
+ CompilerKit::STLString cmd{};
+
if (!std::getline(std::cin, cmd)) break;
if (cmd == "c" || cmd == "cont" || cmd == "continue") {
@@ -57,7 +58,6 @@ NECTAR_MODULE(DebuggerMachPOSIX) {
kKeepRunning = true;
kStdOut << "[+] Continuing...\n";
-
pfd::notify("Debugger Event", "Continuing...");
}
}