[erlang-questions] Emacs Distel error "Module is not interpreted, can't set breakpoints." after interpreting
fedora
fedora789@REDACTED
Sat Oct 31 02:27:26 CET 2009
Thanks, Bob. I installed that distel fork.
The process list ( C-c C-d l) works and distel:who_calls returns OK.
But I still can't set breakpoint after interpreting due to error
"Module is not interpreted, can't set breakpoints."
I traced the error message to distel/elisp/edb.el and commented out
the check of edb-module-interpreted-p . After this change, breakpoint
setting works a couple times.
But 50% of the cases the function with breakpoint hangs after I ran it.
(defun edb-toggle-breakpoint (node module line)
"Toggle a breakpoint on the current line."
(interactive (list (erl-target-node)
(edb-module)
(edb-line-number)))
;; (unless (edb-module-interpreted-p module)
;; (error "Module is not interpreted, can't set breakpoints."))
(if edb-buffer-breakpoints-stale
(edb-toggle-stale-breakpoint module line)
(edb-toggle-real-breakpoint node module line)))
I think there might be something wrong with rpc communication between
emacs and the erlang node being debugged. So
edb-module-interpreted-p() got the wrong status about which module has
been interpreted.
I am still trying to figure out how to debug the elisp code.
-John
On 10/29/09, Robert Dionne <dionne@REDACTED> wrote:
> it can be finnicky. Some things to try:
>
> the version that is in github. I forked this one:
> http://github.com/kunley/distel
>
> use -sname when starting and specify that name when connecting
>
> does C-c C-d l work? It show a list of processes.
>
> who calls acts up (C-c C-d w) and I find the best way to make it work
> is to call the function once directly from the erl vm, .eg.
> distel:who_calls(my_module,my_fun,arity).
>
> I'm running R12B01 on OS X 10.6
>
> Cheers,
>
> Bob
>
>
>
> On Oct 29, 2009, at 6:12 PM, johe wrote:
>
>> Hi, I used instructions on http://bc.tech.coop/blog/070528.html to
>> setup distel debugging. I kept getting error "Module is not
>> interpreted, can't set breakpoints." after model interpreting. Here's
>> the details:
>>
>> ========================================
>>
>> Environment:
>>
>> GNU Emacs 23.1.1 (x86_64-redhat-linux-gnu, GTK+ Version 2.16.5)
>> of 2009-08-03 on x86-4.fedora.phx.redhat.com
>>
>> Erlang R13B02 (erts-5.7.3) [source] [64-bit] [smp:2:2] [rq:2]
>> [async-threads:0] [hipe] [kernel-poll:false]
>> ( switching to Erlang R12 5.6.5 [source] [64-bit] also got the same
>> error)
>>
>> Linux Fedora release 11: fc11.x86_64
>>
>> Distel from Repository Root: http://distel.googlecode.com/svn
>> Revision: 93
>> Last Changed Date: 2009-08-02 16:38:33 -0700 (Sun, 02 Aug 2009)
>>
>> ========================================
>>
>> Steps:
>>
>> * compile with debug info
>>
>> (emacs@REDACTED)> c(test, debug_info).
>>
>> ========================================
>>
>> * connect emacs to erlang node emacs@REDACTED ( C-c C-d n )
>>
>> ========================================
>>
>>
>> * distel reload erlang module ( C-c C-d L)
>>
>> after this step I can see distel in the erlang node.
>>
>> (emacs@REDACTED)6> i().
>> ... ...
>> <0.33.0> supervisor:kernel/1
>> 233 57 0
>> kernel_safe_sup gen_server:loop/6 9
>> <0.36.0> erlang:apply/2 2584
>> 40333 0
>> rpc:local_call/3 49
>> <0.46.0> inet_tcp_dist:do_accept/6
>> 610 516 0
>> dist_util:con_loop/9 11
>> <0.50.0> distel:gl_proxy/1
>> 233 1 0
>> 'distel_gl_for_<8785. distel:gl_proxy/1 4
>> Total 28992
>> 812442 0
>> 286
>> ok
>>
>>
>> ========================================
>>
>> * Toggle debug interpreting of the module ( C-c C-d i)
>> got messsage : Interpreting: test
>> got distel:debug_subscriber* in i() output
>>
>>
>> (emacs@REDACTED)7> i().
>>
>> ... ...
>> <0.46.0> inet_tcp_dist:do_accept/6
>> 987 803 0
>> dist_util:con_loop/9 11
>> <0.50.0> distel:gl_proxy/1
>> 233 1 0
>> 'distel_gl_for_<8785. distel:gl_proxy/1 4
>> <0.53.0> distel:debug_subscriber_init/2
>> 233 37 0
>> distel:debug_subscriber/1 5
>> <0.55.0> dbg_iserver:init/1
>> 377 104 0
>> dbg_iserver gen_server:loop/6 9
>> Total 29945
>> 901441 0
>> 303
>>
>> ========================================
>>
>> * Toggle a breakpoint at current line ( C-c SPC)
>> got messsage : Module is not interpreted, can't set breakpoints.
>>
>> When distel debugging work, i() should show two new process
>> distel:attach_init/2,
>> distel:attach_loop/1,
>> but now it doesn't:
>>
>>
>> (emacs@REDACTED)8> i().
>> ... ...
>>
>>
>> <0.46.0> inet_tcp_dist:do_accept/6 987
>> 1248 0
>> dist_util:con_loop/9 11
>> <0.50.0> distel:gl_proxy/1
>> 233 1 0
>> 'distel_gl_for_<8785. distel:gl_proxy/1 4
>> <0.53.0> distel:debug_subscriber_init/2
>> 233 37 0
>> distel:debug_subscriber/1 5
>> <0.55.0> dbg_iserver:init/1
>> 377 104 0
>> dbg_iserver gen_server:loop/6 9
>> Total 30322
>> 967176 1
>>
>>
>> ~/.erlang.cookie has been set, erlang:get_cookie() returns correctly.
>>
>> I tried reload and interpret the module multiple times and also
>> switched to erlang R12, still got the same result.
>>
>> I tried to connect to a erlang node outside of emacs, emacs showed a
>> popup windows "Attach debugger to xyz@REDACTED instead of emacs@REDACTED" when
>> interpreting, but still got the same error "Module is not interpreted,
>> can't set breakpoints."
>>
>> Does anyone know how to get information to troubleshooting this
>> problem ?
>>
>> Thanks a lot.
>>
>> John
More information about the erlang-questions
mailing list