<div dir="ltr">Hi Stavros, I'm sorry for the very long delay! Are you still struggling with this problem or did you find a way around it? Would a code_change system message while the process is suspended possibly solve the problem?<div>
Regards</div><div>/siri</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-03-10 23:02 GMT+01:00 Stavros Aronis <span dir="ltr"><<a href="mailto:aronisstav@gmail.com" target="_blank">aronisstav@gmail.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello!<div><br></div><div>I am playing around with code instrumentation and trying to hack the code server so that it applies some transformation whenever it loads *any* module. The hack itself is relatively simple:</div>
<div><br></div><div>1) Instrument and reload any already loaded modules (come to think about it, during this process more modules may be loaded, but let's assume a fixpoint). This is to avoid the case where in order to load A, you have to instrument A, and the instrumenter itself needs a call to X, which is not yet loaded so you have to load X, so you have to instrument X, etc...</div>
<div>2) Get the Core Erlang code of the codeserver and wrap the second argument of erlang:load_module (Line 1264) with a call to my instrumenter (which is a function from binary() -> binary())</div><div>3) Load the patched code_server code</div>
<div>4) Move the code_server process from the old code to the new one.</div><div><br></div><div>I am having trouble with the last step. As far as I understand it, the reason is that the call to system_continue (Line 184) is not qualified, as is the similar call in sys.erl (Line 324).</div>
<div><br></div><div>Is there a reason why this is so? Is there any possibility for this to be patched?</div><div><br></div><div>Cheers,</div><div><br></div><div>Stavros</div><div><br></div></div>
<br>_______________________________________________<br>
erlang-bugs mailing list<br>
<a href="mailto:erlang-bugs@erlang.org">erlang-bugs@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-bugs" target="_blank">http://erlang.org/mailman/listinfo/erlang-bugs</a><br>
<br></blockquote></div><br></div>