Re: recent commit breaks multi-module debugging
Matthias Radestock <[email protected]> Fri, 22 Jun 2007 10:55:16 +0100
| Newsgroups | gmane.comp.lang.erlang.distel.devel |
|---|---|
| Message-ID | <[email protected]> |
Bill, Bill Clementson wrote: > Matthias Radestock <[email protected]> writes: > >> Bill Clementson <[email protected]> writes: >> >>> The problem is that when a node goes down during debugging and the >>> interpreting state is "on", when you re-connect to the node, you have >>> to turn interpreting "off". >> Why? When the node goes down, the interpreting status is turned off >> automatically by edb-monitor-cleanup. > > After re-connecting to the node and reloading the module, the first > time that I press "C-c C-d i", interpreting is toggled "off". When you say "reloading the module", what do you mean? Are you using the distel's "C-c C-d L" for that? If so that may explain why the value of edb-monitor-node makes a difference, since erl-reload-module calls erl-reinterpret-module if the node is eq to edb-monitor-node and the module is in the interpreted-modules list. Otherwise erl-do-reload is called. There is definitely a bug in this code: it uses 'eq' for testing node name equivalence, instead of 'equal'. We should fix that. I still cannot figure out what impact your patch has on this though. It should only make a difference if the module is in edb-interpreted-modules, which it shouldn't be since that variable will have been cleared when the node died. What is the value of edb-interpreted-modules / the 'interpreted' status as shown in the modeline after the following? 1) kill node that is being debugged -> nil/not-interpreted for me. 2) restart node -> nil/not-interpreted for me. 3) reload module -> nil/not-interpreted for me. 4) toggle interpreting with "C-c C-d i" -> ((test "/tmp/test.erl")) / interpreted for me 5) toggle interpreting again -> nil/not-interpreted for me. The results I get are correct. I suspect they will be different for you, since you say that toggling interpreting after a node restart turns interpreting *off*. NB: I ran the above without your edb-monitor-node clearing patch, and with it; makes no difference. I ran the node from a separate shell since, as I mentioned before, debugging nodes started from emacs does not work for me at all. >> So the only way for your patch to have any effect is if >> edb-monitor-live-p incorrectly returns t instead of nil at some point. > > In fact, my patch does have an effect for me in that I can now restart > debugging in distel when I reconnect to a node. I am not disputing that. But I do not understand *why*. > Unfortunately, for some reason, you are not able to replicate the > problem that I was experiencing. I wonder whether the problem is related to running the node from inside emacs. Do you see the same behaviour when debugging nodes that have been started separately? Regards, Matthias ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/