SYNOPSIS
DESCRIPTION
The trace() command converts msg into human readable text useful for debugging. It makes use of the various lookup tables like mtd16.lutTag and others to generate useful output. Tag names are prefixed with an indicator of their type.
Calling a message in string context will automatically call the trace() function.
Lookup tables
For each tag inside the message the trace function does a reverse lookup into mtd16.lutTag. If successful, the name is decorated with the data type of the contents and printed. If unsuccessful, the tag is printed hexadecimal, prefixed with 0x.
If the first lookup provided a name and a lookup table mtd16.lutName exists, the value of the field is looked up reverse in that table. When successful, the printed value is replaced by the value found in the lookup table.
Filtering
If a function named mtd16.filterTrace(messageCode, tag, value) has been defined, it is called for each value. When the function returns non-nil, the function result is printed instead of the actual value. This is useful if sensitive data must be hidden from debug, e.g. passwords and keys.
RETURN VALUE
NOTES
EXAMPLE
Note how 1 is replaced by busy due to mtd16.lutFnord.