From 705e3914e4e820c3ac92892c32c93479691a09e7 Mon Sep 17 00:00:00 2001 From: hachem Date: Thu, 27 Aug 2026 14:17:34 +0200 Subject: add: debugger interface --- src/main.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'src/main.cpp') 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 auto main(int argc, char** argv) -> int { - (void)argc; - (void)argv; + const std::span arguments(argv, static_cast(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; -- cgit v1.3