[erlang-questions] Line Numbers in annotations in core erlang as they relate to stack traces

Björn Gustavsson bgustavsson@REDACTED
Mon Jan 2 08:25:10 CET 2012


On Fri, Dec 30, 2011 at 6:33 PM, Eric B Merritt <ericbmerritt@REDACTED> wrote:
> Guys,
>
> There seems to be a bug in R15B core erlang where line numbers specified
> in annotations are not available in stack traces. As always this could
> be a misunderstanding on my part. However, given a core erlang form of
> cerl:ann_c_apply([10], ...) and an exception occurs at that location the
> line numbers seem not to be available to what ever creates the stack
> trace. I have to assume that I am missing something here. If erlang is
> actually transformed to core erlang before being compiled to beam it
> doesn't make sense that this would be over looked. As always any insight
> is welcome.
>

The BEAM compiler does not emit any line number information unless
a file name is also available. So it should be

cerl:ann_c_apply([10,{file,"some_file"}], ...)


-- 
Björn Gustavsson, Erlang/OTP, Ericsson AB



More information about the erlang-questions mailing list