Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

annotate.lua translates bytecodes in abort reasons

  • Loading branch information...
commit d0d6154d310a87ea31118baea823fc17cead705e 1 parent 24280f4
Geoff Leyland geoffleyland authored

Showing 1 changed file with 6 additions and 1 deletion. Show diff stats Hide diff stats

  1. +6 1 lua/jit/annotate.lua
7 lua/jit/annotate.lua
@@ -56,7 +56,12 @@ end
56 56
57 57 function trace_callbacks.abort(tr, func, pc, code, reason)
58 58 local t = traces[tr][#traces[tr]]
59   - t.abort = { info=jit.util.funcinfo(func, pc), code=code, reason=fmterr(code, reason) }
  59 + local reason=fmterr(code, reason)
  60 + reason = reason:gsub("bytecode (%d+)", function(c)
  61 + c = tonumber(c) * 6
  62 + return "bytecode "..vmdef.bcnames:sub(c, c+6):gsub(" ", "")
  63 + end)
  64 + t.abort = { info=jit.util.funcinfo(func, pc), code=code, reason=reason }
60 65 t.stop = t.abort.info
61 66 end
62 67

0 comments on commit d0d6154

Please sign in to comment.
Something went wrong with that request. Please try again.