[erlang-questions] Line Numbers in annotations in core erlang as they relate to stack traces
Eric Merritt
ericbmerritt@REDACTED
Mon Jan 2 18:12:14 CET 2012
Björn,
Thanks, I just discovered this for myself yesterday after a bit of
playing around with compiling erlang sources to core and asm. Just for
future readers, ordering doesñ't matter and the file name can be an
empty string, though that wont be too useful from a line numbering
standpoint.
Eric
2012/1/2 Björn Gustavsson <bgustavsson@REDACTED>:
> 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