aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
blob: b96a74a8814b739af3582948a88df4496e611a91 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include "core/application.h"
#include "core/log.h"

#include "debugger/debugger.h"

#include <span>

auto main(int argc, char** argv) -> int
{
    const std::span arguments(argv, static_cast<size_t>(argc));

    Hsdbg::ApplicationSpec spec;
    spec.name = "hsdbg";
    spec.width = 1600;
    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;
}