The Go compiler supports mapping between original source information and
generated Go code with the line compiler directive. Using this technique
Oden source information is now available in stack traces and when debugging
compiled programs. This feature just landed on the master branch and will be
available in the 0.3.3 release.
Given an Oden program like the following:
When compiled the Go output looks like this:
And a short transcript from a gdb session:
As a side note, when looking at the Go output you might notice there’s a lot of
useless function wrapping. This is planned to be stripped away in the codegen
phase of the compiler. As stated in the goals of the project, “emphasis lies
on a simple implementation with correct semantics, not compilation or runtime
speed”.