From deeb8196c4d4085f3cc5a3389b568de7da739190 Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Tue, 28 Jun 2011 23:23:34 +0200 Subject: Reorganize trace linking and track link types. --- lib/dump.lua | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'lib/dump.lua') diff --git a/lib/dump.lua b/lib/dump.lua index 5f32eb80..6ada21bc 100644 --- a/lib/dump.lua +++ b/lib/dump.lua @@ -504,13 +504,15 @@ local function dump_trace(what, tr, func, pc, otr, oex) if what == "abort" then out:write(" ", fmtfunc(func, pc), " -- ", fmterr(otr, oex), "\n") else - local link = traceinfo(tr).link - if link == tr then - link = "loop" - elseif link == 0 then - link = "interpreter" + local info = traceinfo(tr) + local link, ltype = info.link, info.linktype + if link == tr or link == 0 then + out:write(" -> ", ltype, "\n") + elseif ltype == "root" then + out:write(" -> ", link, "\n") + else + out:write(" -> ", link, " ", ltype, "\n") end - out:write(" -> ", link, "\n") end if dumpmode.H then out:write("\n\n") else out:write("\n") end else -- cgit v1.2.3-55-g6feb