[erlang-questions] (no subject)
Russell Brown
russell@REDACTED
Tue Nov 13 17:57:42 CET 2018
Hi,
I have a something I don't understand with redbug, if anyone can shed
light, I'd be grateful.
Start two nodes
erl -name trc@REDACTED -setcookie trc -pa PATH_TO_EPER_BIN
erl -name rpc@REDACTED -setcookie trc
in the second node (rpc@REDACTED) I run the following:
(rpc@REDACTED)3> net_kernel:hidden_connect('trc@REDACTED').
true
(rpc@REDACTED)4> rpc:call('trc@REDACTED', redbug, start,
["erlang:term_to_binary", [{arity, true}, {print_file,
"/home/russell/t2btrc"}]]).
{40,2}
(rpc@REDACTED)5> rpc:call('trc@REDACTED', erlang, term_to_binary,
[{my_tuple, is, boss}]).
<<131,104,3,100,0,8,109,121,95,116,117,112,108,101,100,0,
2,105,115,100,0,4,98,111,115,115>>
(rpc@REDACTED)6>
=ERROR REPORT==== 13-Nov-2018::16:48:17 ===
Error in process <0.46.0> on node 'trc@REDACTED' with exit value:
{terminated,[{io,format,[<0.44.0>,"~s~n",["\n16:48:17 <0.52.0>(dead)
{erlang,term_to_binary,1}"]],[]},{redbug,'-mk_outer/1-fun-2-',5,[{file,"src/redbug.erl"},{line,343}]},{redbug,'-wrap_print_fun/1-fun-0-',3,[{file,"src/redbug.erl"},{line...
redbug done, terminated - [{io,format,
[<5930.44.0>,"~s~n",
["\n16:48:17 <0.52.0>(dead)
{erlang,term_to_binary,1}"]],
[]},
{redbug,'-mk_outer/1-fun-2-',5,
[{file,"src/redbug.erl"},{line,343}]},
{redbug,'-wrap_print_fun/1-fun-0-',3,
[{file,"src/redbug.erl"},{line,329}]},
{lists,foldl,3,[{file,"lists.erl"},{line,1248}]},
{redbug,print_loop,2,
[{file,"src/redbug.erl"},{line,519}]}]
AND the file "/home/russell/t2btrc" is empty, but created.
However, if I run
(trc@REDACTED)1> redbug:start("erlang:term_to_binary", [{arity,
true}, {print_file, "/home/russell/t2btrc"}]).
{38,2}
(trc@REDACTED)2> erlang:term_to_binary({my_tuple, is, boss}).
<<131,104,3,100,0,8,109,121,95,116,117,112,108,101,100,0,
2,105,115,100,0,4,98,111,115,115>>
redbug done, timeout - 1
(trc@REDACTED)3>
In the node (trc@REDACTED) the file is created and contains
16:49:39 <0.39.0>({erlang,apply,2}) {erlang,term_to_binary,1}
What is up with that?
Thanks in advance if you can explain that to me at all. I did try
reading the redbug code to figure out what was happening, but it wasn't
so easy to follow for me.
Cheers
Russell
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20181113/5b7516fc/attachment.htm>
More information about the erlang-questions
mailing list