[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how to edit+compile+debug without leaving GNU/Emacs
From: |
Colin S. Miller |
Subject: |
Re: how to edit+compile+debug without leaving GNU/Emacs |
Date: |
Mon, 20 Feb 2006 19:09:01 +0000 |
User-agent: |
Debian Thunderbird 1.0.2 (X11/20051002) |
venk wrote:
hello all,
At my work place, policies say sources are to be edited on one
machine(say edit.machine.com) and cimpilation is to be done on another
machine(say build.machine.com) and test run or debug on another machine
(debug.machine.com).
I like to know if it is possible to start Emacs on edit.machi.. and
somehow make M-x compile connect to build.mach..(using ssh. telnet and
rlogin appears to be closed) and show the build messages on *compile*
buffer. Also, similarly, make M-x gdb (through ssh) run the binary on
debug.mac...
If anybody knows how to do this or is already doing something like
this, please let me know how to do it.
If there's a shared directory that each machine can access,
and they are mounted on the same point on each machine, then
1) run emacs on edit.example.com
2) to build, use
M-x compile RET
ssh build.example.com "cd /remote-home/venk/src/ ; make -k"
3) to debug, use gdbserver.
This means that gdb runs on edit.example.com,
but it controls a debugger on debug.example.com
You then log into debug.example.com and run
gdbserver :9999 /remote-home/venk/build/myprog
This starts gdbserver, and it listens on port 9999
Then in gdb, enter
target remote debug:9999
sym /remote-home/venk/build/myprog
which will connect gdbserver and start debugging.
The port 9999 is arbitrary, you can use any port
that is free.
The sym(bol) function will tell gdb where
the symbol-information is located.
Unfortunately, the 'run' command doesn't work,
use 'continue' to start the debug. To restart the
debug, kill and restart gdbserver.
You said that "ssh appears to be closed", how do you normally
access the build-host?
HTH,
Colin S. Miller
--
Replace the obvious in my email address with the first three letters of the
hostname to reply.
Re: how to edit+compile+debug without leaving GNU/Emacs,
Colin S. Miller <=