[erlang-questions] Fwd: How to read process's backtrace data?

skyman <>
Wed Nov 14 16:26:38 CET 2012


Hi erlang developers,
Can anyone answer this question please? Thanks in advance.


Begin forwarded message:
Hi everyone,
erlang:process_display(Pid,backtrace) can display process's backtrace data. For example:
()6> erlang:process_display(self(),backtrace).
Program counter: 0x00cf1498 (unknown function)
CP: 0x0245e8f8 (erl_eval:do_apply/6 + 208)


0x03b1fb34 Return addr 0x01b7f060 (shell:exprs/7 + 368)
y(0)     []
y(1)     none


0x03b1fb40 Return addr 0x01b7eb94 (shell:eval_exprs/7 + 80)
y(0)     []
y(1)     []
y(2)     cmd
y(3)     []
y(4)     {value,#Fun<shell.7.20862592>}
y(5)     {eval,#Fun<shell.24.20862592>}
y(6)     12305
y(7)     []
y(8)     []
y(9)     []


0x03b1fb6c Return addr 0x01b7e968 (shell:eval_loop/3 + 308)
y(0)     []
y(1)     []
y(2)     []
y(3)     []
y(4)     <0.30.0>
y(5)     Catch 0x01b7ec08 (shell:eval_exprs/7 + 196)


0x03b1fb88 Return addr 0x00a88f6c (<terminate process normally>)
y(0)     12305
y(1)     <0.30.0>
true

However, I don't know how to read the information above, such as what do "Program counter", Return addr", "+ 368" and "y(0) y(1) ..." mean? Can anyone teach me?
Thanks in advance!





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20121114/5877e808/attachment.html>


More information about the erlang-questions mailing list