zba-gdbstub/src/main.zig

19 lines
421 B
Zig
Raw Normal View History

2022-12-11 02:47:11 +00:00
const std = @import("std");
const Server = @import("gdbstub").Server;
2022-12-11 02:47:11 +00:00
pub fn main() !void {
2022-12-15 02:54:08 +00:00
const log = std.log.scoped(.Main);
2022-12-11 02:47:11 +00:00
var gpa = std.heap.GeneralPurposeAllocator(.{}){};
defer std.debug.assert(!gpa.deinit());
const allocator = gpa.allocator();
2022-12-15 02:54:08 +00:00
var server = try Server.init();
defer server.deinit(allocator);
2022-12-11 02:47:11 +00:00
2022-12-15 02:54:08 +00:00
try server.run(allocator);
2022-12-11 02:47:11 +00:00
log.info("Client disconnected", .{});
}