compression package wip + debugger bugfixes
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user