Start with luadebug

This commit is contained in:
2025-10-23 23:13:48 +02:00
parent 8cde56a4e8
commit 1cd7b378b6
5 changed files with 94 additions and 24 deletions

46
runners/luadebug.lua Normal file
View File

@ -0,0 +1,46 @@
local core = require "core"
local process = require "process"
---@class LDB
local LDB = {
name = "luadebug"
}
---@param target table Target table
---@param name string Name of the target to run
---@return process|nil
function LDB:run(target, name)
end
-- Wait untill it ends, possibly with timeout
---@param proc process Process object
---@param time any Time field, process.WAIT_INFINITE
function LDB:wait(proc, time)
return proc:wait(time)
end
-- Read the stdout, returns nil if process has stopped
---@param proc process Process object
function LDB:read_stdout(proc)
return proc:read_stdout()
end
-- Read the stderr
---@param proc process Process object
function LDB:read_stderr(proc)
return proc:read_stderr()
end
-- Kill the process
---@param proc process Process object
function LDB:kill(proc)
proc:kill()
end
-- Terminate the process
---@param proc process Process object
function LDB:terminate(proc)
proc:terminate()
end
return LDB