diff options
author | Mike Pall <mike> | 2010-09-15 00:51:43 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2010-09-15 00:51:43 +0200 |
commit | 77267bc5384b4211418a05f0897ff336c4e1279e (patch) | |
tree | 9109295907b04ce21af9305a8105e8fdb4167a6e /lib | |
parent | 8dc76ee3276e504d739818322e4dff37e6ae1c11 (diff) | |
download | luajit-77267bc5384b4211418a05f0897ff336c4e1279e.tar.gz luajit-77267bc5384b4211418a05f0897ff336c4e1279e.tar.bz2 luajit-77267bc5384b4211418a05f0897ff336c4e1279e.zip |
Show names of IR calls in disassembler output.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/dump.lua | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/dump.lua b/lib/dump.lua index a00862d0..b0a334e6 100644 --- a/lib/dump.lua +++ b/lib/dump.lua | |||
@@ -59,8 +59,8 @@ local jutil = require("jit.util") | |||
59 | local vmdef = require("jit.vmdef") | 59 | local vmdef = require("jit.vmdef") |
60 | local funcinfo, funcbc = jutil.funcinfo, jutil.funcbc | 60 | local funcinfo, funcbc = jutil.funcinfo, jutil.funcbc |
61 | local traceinfo, traceir, tracek = jutil.traceinfo, jutil.traceir, jutil.tracek | 61 | local traceinfo, traceir, tracek = jutil.traceinfo, jutil.traceir, jutil.tracek |
62 | local tracemc, traceexitstub = jutil.tracemc, jutil.traceexitstub | 62 | local tracemc, tracesnap = jutil.tracemc, jutil.tracesnap |
63 | local tracesnap = jutil.tracesnap | 63 | local traceexitstub, ircalladdr = jutil.traceexitstub, jutil.ircalladdr |
64 | local bit = require("bit") | 64 | local bit = require("bit") |
65 | local band, shl, shr = bit.band, bit.lshift, bit.rshift | 65 | local band, shl, shr = bit.band, bit.lshift, bit.rshift |
66 | local sub, gsub, format = string.sub, string.gsub, string.format | 66 | local sub, gsub, format = string.sub, string.gsub, string.format |
@@ -82,6 +82,10 @@ local nexitsym = 0 | |||
82 | -- Fill symbol table with trace exit addresses. | 82 | -- Fill symbol table with trace exit addresses. |
83 | local function fillsymtab(nexit) | 83 | local function fillsymtab(nexit) |
84 | local t = symtab | 84 | local t = symtab |
85 | if nexitsym == 0 then | ||
86 | local ircall = vmdef.ircall | ||
87 | for i=0,#ircall do t[ircalladdr(i)] = ircall[i] end | ||
88 | end | ||
85 | if nexit > nexitsym then | 89 | if nexit > nexitsym then |
86 | for i=nexitsym,nexit-1 do t[traceexitstub(i)] = tostring(i) end | 90 | for i=nexitsym,nexit-1 do t[traceexitstub(i)] = tostring(i) end |
87 | nexitsym = nexit | 91 | nexitsym = nexit |