compression package wip + debugger bugfixes

This commit is contained in:
kepler155c@gmail.com
2020-05-31 23:51:04 -06:00
parent d203510527
commit fb5e69f703
10 changed files with 1011 additions and 7 deletions

View File

@@ -9,10 +9,33 @@ local dbg = {
breakpoints = nil,
}
local romFiles = {
load = function(self)
local function recurse(dir)
local files = fs.list(dir)
for _,f in ipairs(files) do
local fullName = fs.combine(dir, f)
if fs.isDir(fullName) then
recurse(fullName)
else
self.files[f] = fullName
end
end
end
recurse('rom/apis')
end,
get = function(self, file)
return self.files[file]
end,
files = { },
}
romFiles:load()
local function breakpointHook(info)
if dbg.breakpoints then
local src = romFiles:get(info.short_src) or info.short_src
for _,v in pairs(dbg.breakpoints) do
if v.line == info.currentline and v.file == info.short_src then
if v.line == info.currentline and v.file == src then
return not v.disabled
end
end

View File

@@ -376,7 +376,7 @@ local page = UI.Page {
local line = self.source:getSelected().line
multishell.openTab(_ENV, {
path = 'sys/apps/shell.lua',
args = { ('edit --line=%d %s'):format(line , file) },
args = { ('edit --line=%d %s'):format(line , '/' .. file) },
focused = true,
})
end