[MLton-user] From machine code back to the source code

Matthew Fluet fluet@cs.cornell.edu
Fri, 27 May 2005 21:23:47 -0400 (EDT)


> Is it possible to instruct MLton to add comments with source location
> information to the assembler file (or produce a map file)?  At least
> when profiling information is generated, this data has to be stored
> somewhere.

You are correct that the information is stored, but it's not particularly 
accessible for this sort of code inspection at the current time.  See the 
thread at
http://mlton.org/pipermail/mlton/2005-March/026848.html

The current bottom line remains:

Unfortunately, translating back from the MLtonProfileNNN labels to source 
code locations is something handled automatically by the mlprof tool, but 
could be a bit cumbersome to do by hand.  It probably wouldn't be too hard 
to augment either to compiler or mlprof to do this.