benilla-re systems structs docs

DumpCode

function · lua · boundary

Address
0x6fb790 · 32 bytes, up to 0x6fb7af
Meaning
Writes a prototype's instructions
Confidence
verified, proof one
Finding
lua/chunks#dumping-a-function

Finding: Dumping a function in lua: precompiled chunks

luaU_dump writes a function as a precompiled chunk through a writer function, called with the Lua state, a block, its size and the writer's data. The header is the signature, version 0x50, the byte order 1, the sizes 4, 4, 4, 6, 8, 9, 9 and 8, and the double 31415926.535897933. A function writes its source (none when it is the parent's), line, four bytes, lines, locals, upvalue names, constants (a type byte, then a number or string) and code.

functionnamedecided by
0x6fb600luaU_dumpthe dump state (0x6fb609..0x6fb618), DumpHeader (0x6fb61b), DumpFunction (0x6fb628)
0x6fb940DumpHeadersignature (0x6fb944..0x6fb94e), version (0x6fb955), luaU_endianness (0x6fb95f), sizes (0x6fb96f..0x6fb9c3), the number (0x6fb9cd..0x6fb9d9)
0x6fb640DumpFunctionsource or none (0x6fb646..0x6fb659), line (0x6fb663), four bytes (0x6fb66e..0x6fb68f), the five parts (0x6fb698..0x6fb6bc)
0x6fb810DumpLinescount (0x6fb819), block of 4 each (0x6fb825, 0x6fb828)
0x6fb7b0DumpLocalscount (0x6fb7c3), name and two integers each (0x6fb7dc..0x6fb7f8)
0x6fb830DumpUpvaluescount (0x6fb841), names (0x6fb85b)
0x6fb870DumpConstantscount (0x6fb882), type byte (0x6fb8a2), number (0x6fb8c8), string (0x6fb8b6), prototypes (0x6fb8e7, 0x6fb8ff)
0x6fb790DumpCodecount (0x6fb799), block of 4 each (0x6fb7a5, 0x6fb7a8)
0x6fb730DumpStringnone gives size 0 (0x6fb730..0x6fb73d, 0x6fb759), size with the zero (0x6fb743), the text (0x6fb750)
0x6fb6f0DumpBlockthe writer through [D+4] (0x6fb6f7..0x6fb700)
0x6fb6d0DumpByteone byte (0x6fb6d4..0x6fb6e0)
0x6fb710DumpIntfour bytes (0x6fb714..0x6fb720)

The derivation is in the doc.

Callers 1

Callees 2

Calls and jumps by a bare address, from tables/calls.tsv.