addinfo
function · lua · boundary
- Address
0x6fc8a0· 85 bytes, up to0x6fc8f4- Meaning
- Prefixes a message with the source and line of a Lua call record
- Confidence
- verified, proof one
- Finding
- lua/runtime#error-messages
Finding: Error messages in lua: calls, states and the collector
Run-time errors name what failed. luaG_typeerror builds attempt to <op> <kind> `<name>' (a <type> value) when the operand is on the stack and getobjname finds a name for it (a local, a
global, a field or a method), else attempt to <op> a <type> value; luaG_concaterror,
luaG_aritherror and luaG_ordererror pick the operand and the verb. addinfo prefixes the
message with source:line: of a Lua function. currentpc and currentline read the position,
funcinfo the source and kind of a function, getluaproto the prototype of a call record.
| function | name | decided by |
|---|---|---|
0x6fba10 | currentpc | C flag test (0x6fba13), frame flag copies the live pc (0x6fba1b), (pc - code) >> 2 minus 1 (0x6fba35) |
0x6fbb90 | getluaproto | C flag test (0x6fbb90), function at base[-1], prototype at closure +0xc (0x6fbb9b) |
0x6fbef0 | currentline | currentpc (0x6fbef0), negative gives -1 (0x6fbef9), the line table of the prototype indexed by the pc (0x6fbf0c) |
0x6fbf20 | funcinfo | C: =[C] (0x6fbf2c) and luaO_chunkid (0x6fbf49); Lua: main (0x6fbf66) or Lua (0x6fbf6d), luaO_chunkid (0x6fbf7d) |
0x6fc4c0 | getobjname | luaF_getlocalname (0x6fc4f5), luaG_symbexec (0x6fc508), opcode 5 gives global (0x6fc577), 6 field (0x6fc59a), 0xb method (0x6fc5bd) |
0x6fc5f0 | kname | index minus 250 (0x6fc5f0), negative gives the question mark, string tag test (0x6fc603), text at +0x10 (0x6fc60b) |
0x6fc620 | luaG_typeerror | isinstack (0x6fc63e), getobjname (0x6fc658), the formats attempt to %s %s `%s' (a %s value) (0x6fc66b) and attempt to %s a %s value (0x6fc687) |
0x6fc6a0 | isinstack | slot loop from base to top in steps of 16 (0x6fc6b0..0x6fc6b9), 1 on equal (0x6fc6be) |
0x6fc6d0 | luaG_concaterror | string tag test (0x6fc6d3), the verb concatenate (0x6fc6db), luaG_typeerror (0x6fc6e0) |
0x6fc6f0 | luaG_aritherror | luaV_tonumber (0x6fc701), the verb perform arithmetic on (0x6fc70f), luaG_typeerror (0x6fc716) |
0x6fc730 | luaG_ordererror | third characters of the type names compared, the two formats (0x6fc754, 0x6fc76b) |
0x6fc8a0 | addinfo | C flag test (0x6fc8ad), currentline (0x6fc8b9), getluaproto (0x6fc8c4), luaO_chunkid (0x6fc8d2), the format %s:%d: %s (0x6fc8e0), luaO_pushfstring (0x6fc8e6) |
The derivation is in the doc.
Callers 1
- luaG_runerror lua
Callees 4
- luaO_pushfstring lua
- luaO_chunkid lua
- getluaproto lua
- currentline lua
Calls and jumps by a bare address, from tables/calls.tsv.