Switch for producing a list of addresses of compiled routines from I6 compiler?

Recent experience has demonstrated to me that it can be valuable to know the final addresses of compiled routines, e.g. when reviewing assembly debugging output and when examining story files via hex editor.

I’ve been obtaining this information via print statements in Initialise(), on a routine-by-routine basis as needed. It would be nice if there was a way to have such a list produced automatically, preferably via use of a command-line switch.

Could this be a good replacement usage of the -l switch, which is currently defunct?

Use -k to output the debug file.

Agree, this is what -k is for.

(If you’re compiling a non-library game, like glulxercise.inf or another test, you may have to use -k -~D . The -k option turns on debug mode, but this causes compilation problems with non-library games.)

The gameinfo.dbg file produced by -k is very verbose. You might want to use XML tools to extract the info you want. (A text editor will work too, it’s just a bit of a headache.)

But I’d rather have one verbose option than a bunch of special-case options. Inform already has a bunch of switches to emit different “statistics” reports, most of which are never used and partially overlap the others.

The -k output produces a giant wad of XML (which locks up xed when I try to open it, actually). I got it open with a browser, but it’s not exactly a user-friendly format.

I was thinking of something akin to the output from using Trace symbols; inside your file – just a catalog of routine names with basic info (including hex address) in human-readable format. Even some -k suboptions, e.g. -kR to emit only information on routines, could be useful.

Still, -k is better than nothing, so thank you.

My opinion is that you get all of that by post-processing the XML. Complicating the compiler to produce it specially is a bad idea.

1 Like