Remote Debugger Port

1 view
Skip to first unread message

magnan

unread,
May 14, 2009, 11:22:05 AM5/14/09
to Jazz Scheme
Hi,

I am trying to launch remote process and attach them to the Jedi
debugger. For that I use the following function:


(define (instanciate-module moduleType Debugger-Port)
(let ((command (car (command-line)))
(args (list "-run" "GIT-Module-Loader"
"-debugger" (string-append "127.0.0.1:" (number-
>string Debugger-Port))
"-interactive" "true"
"-module-name" moduleType)))
(open-process (list path: command
arguments: args))))


My problem is about determining the Debugger-Port argument. This is
the port the Jedi debugger listens at.

(listening-port~ (get-remote-listener))

but it seems to return the port of the debuggee instead of the port of
the debugger.

How can I get the debugger port?

Thank you,
Francois Magnan

Guillaume Cartier

unread,
May 20, 2009, 7:53:39 AM5/20/09
to jazzs...@googlegroups.com
It would seem you are executing the (listening-port~
(get-remote-listener)) command *inside* the debuggee if it is
returning the debuggee port.

All debugger - debuggee communication uses JRM (Jazz Remoting Module).
In JRM a single port is used to communicate with any process. That
port is assigned when the remote listener is started and by default it
is 'any meaning that TCP/IP will be asked to assign any available
port.

To solve your problem either

- execute (listening-port~ (get-remote-listener)) inside the debugger
and communication this information to your debuggee or even simpler
- you can specify an explicit listener port for any Jazz process
through the -listen command switch so that for instance you could
launch jedi like this: jedi -listen :4000 and then communicate to the
debugger on port 4000

Guillaume
Reply all
Reply to author
Forward
0 new messages