[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: debug for call ret implementation
- From: "Victor Bombi" <sonoro@...>
- Date: Tue, 8 Jul 2014 14:36:57 +0200
Hello,
Trying to implement the suggestion from PIL book about improving debug
hooks being first call ret hooks and then going to line debug hook when we
are on target function I have
local func = getinfo(2,"f").func
if functable[func]==nil then
local breakpoints = Debugger.breakpoints
local debuginfo = getinfo(2,"SL")
local activelines = debuginfo.activelines
local source = debuginfo.source
local func = getinfo(2,"f").func
if functable[func]==nil then
local breakpoints = Debugger.breakpoints
local debuginfo = getinfo(2,"SL")
local activelines = debuginfo.activelines
local source = debuginfo.source
functable[func] = false
if activelines then
for line,_ in pairs(activelines) do
if breakpoints[line] and breakpoints[line][source] then
functable[func] = true
break
end
end
end
end
then if functable[func]==true I switch to the line hook
It turns out that this debugger is about twice slower than straigth line
hook debugger!!!
Was not a good suggestion?
My implementation is really bad?
Thanks
victor bombi