diff options
| author | hachem <im@hachem.wtf> | 2026-08-27 14:17:34 +0200 |
|---|---|---|
| committer | hachem <im@hachem.wtf> | 2026-08-27 14:17:34 +0200 |
| commit | 705e3914e4e820c3ac92892c32c93479691a09e7 (patch) | |
| tree | bad8932559620328da060ea45245fcabec2332f2 /src/main.cpp | |
| parent | 90398614bcc9e1c1bde7a0f65a0db66173a1d8b4 (diff) | |
add: debugger interface
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp index bb72b0b..b96a74a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,9 +1,13 @@ #include "core/application.h" +#include "core/log.h" + +#include "debugger/debugger.h" + +#include <span> auto main(int argc, char** argv) -> int { - (void)argc; - (void)argv; + const std::span arguments(argv, static_cast<size_t>(argc)); Hsdbg::ApplicationSpec spec; spec.name = "hsdbg"; @@ -11,6 +15,13 @@ auto main(int argc, char** argv) -> int spec.height = 900; Hsdbg::Application app(spec); + + if (arguments.size() > 1) + { + if (const auto result = app.debugger().load_target(arguments[1]); !result) + Hsdbg::Log::error("{}", result.error()); + } + app.run(); return 0; |
