diff options
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; |
