(forgot to hit "reply to all" again...)<br><br><div><span class="gmail_quote">On 6/7/07, <b class="gmail_sendername">Olivier Sambourg</b> <<a href="mailto:olivier.sambourg@gmail.com">olivier.sambourg@gmail.com
</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div>Hi,</div>
<div> </div>
<div>A friendly warning: what follows may be crap and/or totally unsuited to your needs, but it's just an idea I had reading your mail.</div>
<div> </div>
<div>What about having two separate sets of beam files? One "production" set, and a "debug" set compiled with the +export_all compiler option (or Emakefile if you use them), both from the same source files.
</div>
<div>You could store the second set out of your code path. And when the need arises, you change the path (code:del_path / add_path) then load the module(s) you want to debug. When you're finished, change the path back and reload the module(s).
</div>
<div> </div>
<div>Not something you'd wish to do everyday, but I believe it might work... And it's simple :)<br> </div>
<div> </div>
<div>Regards,</div><span class="sg">
<div> </div>
<div>Olivier<br> </div></span><div><span class="e" id="q_1130594a4d8f9649_2">
<div><span class="gmail_quote">On 6/7/07, <b class="gmail_sendername">Luke Gorrie</b> <<a href="mailto:luke.gorrie@synap.se" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">luke.gorrie@synap.se</a>
> wrote:</span>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;">Howdy,<br><br>Just a friendly reminder -<br><br>I need to be able to call unexported functions from the Erlang shell.
<br>I need to do this in lots of contexts - simple experimenting,<br>late-night troubleshooting on live networks, etc. This is not a<br>personal quirk, it's the nature of the work that we do at Synapse.<br><br>I would very much like a better way to accomplish this than adding
<br>-compile(export_all) to all the modules, which is what we do today.<br>I hope one day Erlang adds a better option.<br><br>I have previously posted a parse_transform that creates a "back door"<br>for calling unexported functions and a patch to R9's erl_eval to use
<br>it for the shell. This would be perfectly adequate except that I don't<br>like to use parse_transforms and interpreter hacks in production<br>systems and so we don't deploy this code on customer installations.
<br><br>I know that there are implications for the compiler etc but these are<br>implementation details separate from the real-life requirement.<br><br>Cheers,<br>-Luke<br><br><br>_______________________________________________
<br>erlang-questions mailing list<br><a href="mailto:erlang-questions@erlang.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">erlang-questions@erlang.org</a><br><a href="http://www.erlang.org/mailman/listinfo/erlang-questions" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://www.erlang.org/mailman/listinfo/erlang-questions
</a><br></blockquote></div><br>
</span></div></blockquote></div><br>