From e664945e0bc26b5c6c3860a1d63913d56833c173 Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Mon, 15 Feb 2010 22:26:33 +0100 Subject: Change record vmevent parameters. Dump function id on FUNC*. --- lib/dump.lua | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'lib/dump.lua') diff --git a/lib/dump.lua b/lib/dump.lua index c12b0ba8..ccd43d72 100644 --- a/lib/dump.lua +++ b/lib/dump.lua @@ -483,15 +483,21 @@ local function dump_record(tr, func, pc, depth, callee) recdepth = depth recprefix = rep(" .", depth) end - local line = bcline(func, pc, recprefix) - if dumpmode.H then line = gsub(line, "[<>&]", html_escape) end - if type(callee) == "function" then - out:write(sub(line, 1, -2), " ; ", fmtfunc(callee), "\n") + local line + if pc >= 0 then + line = bcline(func, pc, recprefix) + if dumpmode.H then line = gsub(line, "[<>&]", html_escape) end + else + line = "0000 "..recprefix.." FUNCC \n" + callee = func + end + if pc <= 0 then + out:write(sub(line, 1, -2), " ; ", fmtfunc(func), "\n") else out:write(line) end - if band(funcbc(func, pc), 0xff) < 16 then -- Write JMP for cond. ORDER BC - out:write(bcline(func, pc+1, recprefix)) + if pc >= 0 and band(funcbc(func, pc), 0xff) < 16 then -- ORDER BC + out:write(bcline(func, pc+1, recprefix)) -- Write JMP for cond. end end -- cgit v1.2.3-55-g6feb