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
| offset | size | type | name | meaning | confidence | finding |
|---|---|---|---|---|---|---|
0x0000 | 4 | uint32_t | m_hash | Holds the hash of the name | verified, proof one | console/commands#command-records |
0x0004 | 8 | uint32_t[2] | m_bucketLink | Holds the link in the hash bucket chain | verified, proof one | console/commands#command-records |
0x000c | 8 | uint32_t[2] | m_listLink | Holds the link in the list of all commands | verified, proof one | console/commands#command-records |
0x0014 | 4 | const char * | m_name | Holds the name pointer the registrant passed | verified, proof one | console/commands#command-records |
0x0018 | 4 | void * | m_handler | Holds the handler called with the name and the arguments | verified, proof one | console/commands#command-records |
0x001c | 4 | const char * | m_help | Holds the help line, or 0 | verified, proof one | console/commands#command-records |
0x0020 | 4 | uint32_t | m_category | Holds the category id | verified, proof one | console/commands#command-records |