aboutsummaryrefslogtreecommitdiff
path: root/lib/v.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lib/v.lua')
-rw-r--r--lib/v.lua17
1 files changed, 11 insertions, 6 deletions
diff --git a/lib/v.lua b/lib/v.lua
index bf61f125..d2a0c235 100644
--- a/lib/v.lua
+++ b/lib/v.lua
@@ -22,7 +22,7 @@
22-- 22--
23-- The output from the first example should look like this: 23-- The output from the first example should look like this:
24-- 24--
25-- [TRACE 1 (command line):1] 25-- [TRACE 1 (command line):1 loop]
26-- [TRACE 2 (1/3) (command line):1 -> 1] 26-- [TRACE 2 (1/3) (command line):1 -> 1]
27-- 27--
28-- The first number in each line is the internal trace number. Next are 28-- The first number in each line is the internal trace number. Next are
@@ -111,15 +111,20 @@ local function dump_trace(what, tr, func, pc, otr, oex)
111 startex, startloc, fmterr(otr, oex))) 111 startex, startloc, fmterr(otr, oex)))
112 end 112 end
113 elseif what == "stop" then 113 elseif what == "stop" then
114 local link = traceinfo(tr).link 114 local info = traceinfo(tr)
115 if link == 0 then 115 local link, ltype = info.link, info.linktype
116 if ltype == "interpreter" then
116 out:write(format("[TRACE %3s %s%s -- fallback to interpreter]\n", 117 out:write(format("[TRACE %3s %s%s -- fallback to interpreter]\n",
117 tr, startex, startloc)) 118 tr, startex, startloc))
118 elseif link == tr then 119 elseif link == tr or link == 0 then
119 out:write(format("[TRACE %3s %s%s]\n", tr, startex, startloc)) 120 out:write(format("[TRACE %3s %s%s %s]\n",
120 else 121 tr, startex, startloc, ltype))
122 elseif ltype == "root" then
121 out:write(format("[TRACE %3s %s%s -> %d]\n", 123 out:write(format("[TRACE %3s %s%s -> %d]\n",
122 tr, startex, startloc, link)) 124 tr, startex, startloc, link))
125 else
126 out:write(format("[TRACE %3s %s%s -> %d %s]\n",
127 tr, startex, startloc, link, ltype))
123 end 128 end
124 else 129 else
125 out:write(format("[TRACE %s]\n", what)) 130 out:write(format("[TRACE %s]\n", what))