The Inform debugging information format ======================================= One option when compiling with Inform is to generate a file of debugging information, which may be used in conjunction with the object code (the story file) by a run-time debugger (a special kind of game interpreter with tracing and debugging feature). The utility Infact can be used to get a print-out of some or all of the information in this file. A prototype debugger, Infix, is currently being tested. The debugging file is a list of "lines", which occur in no guaranteed order: a single byte gives the line type, and the rest of the format depends on what it is. Type Format 0 (marks end of file) 1 File 2 Class 3 Object <2-byte-number> 4 Global 5 Attribute 6 Property 7 Fake action 8 Action 9 Header <64 bytes of data> 10 Code line
11 Routine starts <2-byte number> [... ] 0 12 Codeless line 13 Memory map 14 Routine ends <2-byte number> 15 Source code ref <3-byte address in its file> 16 File size <3-byte number of chars read> Here a is always in the form <2-byte line number> (the two bytes stored high-then-low); are all null terminated; and a Z-code
is a byte address stored in three bytes, high to low. All s are single-byte except where stated. The header is the block of 64 bytes at the front of a "story file" (i.e. Infocom game file). The point of this is that the debugger should only allow itself to be used when these 64 bytes agree with the first 64 of the game being played under it. This pretty much guarantees that the story file was compiled in the same run as the debugging information file. Files are numbered from 1 in order of first opening. Globals are numbered 0 to (potentially) 239. Objects are numbered from 1 upwards (0 is a null value), and there can certainly be more than 255. Because of "aliasing" (i.e. a vile but necessary form of doubling-up) one may expect several attributes/properties to have the same number as each other. Source code references are generated about every 16 lines to enable a program to find a given line number in the source code quickly (without searching through and counting new-lines). September 1994