benilla-re systems structs docs

CONSOLECOMMAND

struct · console · 36 bytes

Meaning
Names the console command record: hash, links, name, handler, help and category
Confidence
verified, proof one
Finding
console/commands#command-records

Finding: Command records in console: commands

A command is a 0x24-byte record under the tag CONSOLECOMMAND: the hash of its name at +0, the bucket link at +4, the list link at +0xc, the name pointer at +0x14 (the caller's pointer, not a copy), the handler at +0x18, the help pointer at +0x1c (0 for none) and the category at +0x20. The table object is the hash table of cvar/containers#hash-table-object at 0xc4f848, with the vtable 0x80e268 and the list link offset 0xc. It starts empty, with mask −1. Records are linked first in their bucket and last in the list, so the list runs in registration order.

The derivation is in the doc.

Fields 7

offsetsizetypenamemeaningconfidencefinding
0x00004uint32_tm_hashHolds the hash of the nameverified, proof oneconsole/commands#command-records
0x00048uint32_t[2]m_bucketLinkHolds the link in the hash bucket chainverified, proof oneconsole/commands#command-records
0x000c8uint32_t[2]m_listLinkHolds the link in the list of all commandsverified, proof oneconsole/commands#command-records
0x00144const char *m_nameHolds the name pointer the registrant passedverified, proof oneconsole/commands#command-records
0x00184void *m_handlerHolds the handler called with the name and the argumentsverified, proof oneconsole/commands#command-records
0x001c4const char *m_helpHolds the help line, or 0verified, proof oneconsole/commands#command-records
0x00204uint32_tm_categoryHolds the category idverified, proof oneconsole/commands#command-records