summaryrefslogtreecommitdiffhomepage
path: root/dev/LibDebugger/src
diff options
context:
space:
mode:
Diffstat (limited to 'dev/LibDebugger/src')
-rw-r--r--dev/LibDebugger/src/POSIX.cc (renamed from dev/LibDebugger/src/DebuggerEnginePOSIX.cc)17
1 files changed, 11 insertions, 6 deletions
diff --git a/dev/LibDebugger/src/DebuggerEnginePOSIX.cc b/dev/LibDebugger/src/POSIX.cc
index b8695fb..21e122c 100644
--- a/dev/LibDebugger/src/DebuggerEnginePOSIX.cc
+++ b/dev/LibDebugger/src/POSIX.cc
@@ -3,13 +3,18 @@
*/
#include <LibCompiler/Defines.h>
-#include <LibDebugger/IDebuggerEngine.h>
+#include <LibDebugger/POSIX.h>
#ifndef _WIN32
LIBCOMPILER_MODULE(DebuggerPOSIX)
{
- LibDebugger::IDebuggerEngine debugger;
+ if (argc < 1)
+ {
+ return EXIT_FAILURE;
+ }
+
+ LibDebugger::POSIX::Debugger debugger;
pid_t pid = 0L;
if (argc >= 3 && std::string(argv[1]) == "-p" &&
@@ -26,7 +31,7 @@ LIBCOMPILER_MODULE(DebuggerPOSIX)
if (cmd == "c" ||
cmd == "cont")
- debugger.ContinueExecution();
+ debugger.Continue();
if (cmd == "d" ||
cmd == "detach")
@@ -57,14 +62,14 @@ LIBCOMPILER_MODULE(DebuggerPOSIX)
std::getline(std::cin, cmd);
- LibDebugger::CAddr breakpoint_addr = reinterpret_cast<LibDebugger::CAddr>(std::stoul(cmd.c_str(), nullptr, 16));
+ LibDebugger::POSIX::CAddr breakpoint_addr = reinterpret_cast<LibDebugger::POSIX::CAddr>(std::stoul(cmd.c_str(), nullptr, 16));
if (breakpoint_addr)
- debugger.SetBreakpoint(breakpoint_addr);
+ debugger.Break(breakpoint_addr);
}
}
- return 0;
+ return EXIT_SUCCESS;
}
#endif \ No newline at end of file