diff options
author | Mike Pall <mike> | 2011-06-28 23:23:34 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2011-06-28 23:23:34 +0200 |
commit | deeb8196c4d4085f3cc5a3389b568de7da739190 (patch) | |
tree | 6b5e9840f785f3fff3348ef1c9aee494cdf06431 /lib/dump.lua | |
parent | 3dbae4ffc2ba8f6ebf8adf86742521bce6dbf8f8 (diff) | |
download | luajit-deeb8196c4d4085f3cc5a3389b568de7da739190.tar.gz luajit-deeb8196c4d4085f3cc5a3389b568de7da739190.tar.bz2 luajit-deeb8196c4d4085f3cc5a3389b568de7da739190.zip |
Reorganize trace linking and track link types.
Diffstat (limited to 'lib/dump.lua')
-rw-r--r-- | lib/dump.lua | 14 |
1 files changed, 8 insertions, 6 deletions
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) | |||
504 | if what == "abort" then | 504 | if what == "abort" then |
505 | out:write(" ", fmtfunc(func, pc), " -- ", fmterr(otr, oex), "\n") | 505 | out:write(" ", fmtfunc(func, pc), " -- ", fmterr(otr, oex), "\n") |
506 | else | 506 | else |
507 | local link = traceinfo(tr).link | 507 | local info = traceinfo(tr) |
508 | if link == tr then | 508 | local link, ltype = info.link, info.linktype |
509 | link = "loop" | 509 | if link == tr or link == 0 then |
510 | elseif link == 0 then | 510 | out:write(" -> ", ltype, "\n") |
511 | link = "interpreter" | 511 | elseif ltype == "root" then |
512 | out:write(" -> ", link, "\n") | ||
513 | else | ||
514 | out:write(" -> ", link, " ", ltype, "\n") | ||
512 | end | 515 | end |
513 | out:write(" -> ", link, "\n") | ||
514 | end | 516 | end |
515 | if dumpmode.H then out:write("</pre>\n\n") else out:write("\n") end | 517 | if dumpmode.H then out:write("</pre>\n\n") else out:write("\n") end |
516 | else | 518 | else |