Home » Language IDEs » C / C++ IDE (CDT) » Remote C development
Remote C development [message #234592] |
Fri, 05 June 2009 11:06  |
Eclipse User |
|
|
|
Hello,
I am using Eclipse CDT to try to make a remote C Project.
I am using this Eclipse on a Windows XP, and I would like to build, launch
an debug on a Linux server.
I explain what I would like to have:
- The goal is to edit files remotely, the files are not on the local
host, but everything is on the Linux server (RedHat Entreprise Linux 5.
- The build has to be made on the Linux Server
- The launch has to be made on the Linux Server
- The debug has to be made on the Linux Server
- And all of that have to be made from Eclipse on Windows
This is a realy difficult task, and I am working on it 8 hours a day since
a week.
Here's the thing I try to make:
- First I installed two plug-ins, RSE (Remote System Explorer) and RDT
(Remote Development Tools).With RDT, we can create a "Remoce C/C++
Project", by connectiong to the remote server.
(To connect to the remote server, I launch a server that waits for a
connection on Linux)
When I am connected to the Linux server, I can create a remote project
located on this server. I also can build a project on this server.
The problem comes when I try to launch or debug it. Under Windows, Eclipse
does not find any binaries. (For exemple I have a binary named "test",
under Linux I can launch it with a terminal)
I first thought it was a binary parser problem, so I check this way, but
when I put "Elf Parser" (the parser for Linux binaries) it doesnt work.
(It does not work with any binary parser).
So I abort to use the "Remote C/C++ Project".
- Then I try to make a local C project, and to use another plug-in "RSE
Remote CDT" that offer a run/debug configuration for "Remote C
application".
To build my project I use a cross-compiler, with Cygwin, to build Linux
binaries from Windows.
(This point works fine, when I try to launch the program on Linux with a
terminal, it works)
I also try with Eclipse to run on the remote server, and it seems to work.
The problem I have is for debug. I made a cross gdb. And I debug with
Eclipse with gdbserver.
The debug seems to work remotely, but there is a problem I don't know how
to manage.
When the program tries to load a library, the debugger goes to look for it
on my Windows. I don't know why it doesn't look for it on Linux.
Here's what I would like to have:
The debug runs on the Linux server, and use the Linux paths, and load
everything on Linux.
I would like everything to be made on Linux (build, launch, and debug).
That's why I come to have some advices, because I think I tried a
everything, and I start to give up the idea it is possible.
Thank you for your help.
Guillaume.
|
|
|
Re: Remote C development [message #234637 is a reply to message #234592] |
Mon, 08 June 2009 05:31   |
Eclipse User |
|
|
|
hi,
> I am using Eclipse CDT to try to make a remote C Project.
> I am using this Eclipse on a Windows XP, and I would like to build,
> launch an debug on a Linux server.
> I explain what I would like to have:
> - The goal is to edit files remotely, the files are not on the local
> host, but everything is on the Linux server (RedHat Entreprise Linux 5.
> - The build has to be made on the Linux Server
> - The launch has to be made on the Linux Server
> - The debug has to be made on the Linux Server
> - And all of that have to be made from Eclipse on Windows
>
> This is a realy difficult task, and I am working on it 8 hours a day
> since a week.
We're in the same ship.
> Here's the thing I try to make:
>
> - First I installed two plug-ins, RSE (Remote System Explorer) and RDT
> (Remote Development Tools).With RDT, we can create a "Remoce C/C++
> Project", by connectiong to the remote server.
> (To connect to the remote server, I launch a server that waits for a
> connection on Linux)
> When I am connected to the Linux server, I can create a remote project
> located on this server. I also can build a project on this server.
> The problem comes when I try to launch or debug it. Under Windows,
> Eclipse does not find any binaries. (For exemple I have a binary named
> "test", under Linux I can launch it with a terminal)
> I first thought it was a binary parser problem, so I check this way, but
> when I put "Elf Parser" (the parser for Linux binaries) it doesn�t work.
> (It does not work with any binary parser).
>
> So I abort to use the "Remote C/C++ Project".
File a bugreport. I'll add my experience, since I came to the same
conclusion. It is broken, I haven't got it working, so I've reverted
back to using vim / make on the development machine.
> - Then I try to make a local C project, and to use another plug-in "RSE
> Remote CDT" that offer a run/debug configuration for "Remote C
> application".
> To build my project I use a cross-compiler, with Cygwin, to build Linux
> binaries from Windows.
> (This point works fine, when I try to launch the program on Linux with a
> terminal, it works)
> I also try with Eclipse to run on the remote server, and it seems to work.
> The problem I have is for debug. I made a cross gdb. And I debug with
> Eclipse with gdbserver.
> The debug seems to work remotely, but there is a problem I don't know
> how to manage.
> When the program tries to load a library, the debugger goes to look for
> it on my Windows. I don't know why it doesn't look for it on Linux.
>
> Here's what I would like to have:
> The debug runs on the Linux server, and use the Linux paths, and load
> everything on Linux.
> I would like everything to be made on Linux (build, launch, and debug).
This is the best you get. I suggest we cook up a bugreport together.
Regards,
Igmar
|
|
| | | | |
Re: Remote C development [message #519469 is a reply to message #518475] |
Mon, 08 March 2010 17:31   |
Eclipse User |
|
|
|
I've experimented with remote build and debug support in the CDT in the last couple of weeks. I've found a couple of things:
1) If you create a project, and specify an RSE path for the directory (instead of in your workspace), it will successfully create a C/C++ project. The only problem is that if you'd like to be able to work on that project from multiple workstations (running Eclipse), it forces you to overwrite the Eclipse .project and .cproject files for every machine you set up. I haven't tried switching from one workstation to another afterwards to see how well that is handled.
2) The only way I've gotten remote make to work is to change the command to do "ssh <host> make -C <remote_dir>". If you have your ssh keys set up properly so that no password is needed on the remote machine, this should work.
3) I was unable to get remote debugging to work. I tried changing the command from "gdb" to "ssh <host> gdb", but I just get errors when attempting to launch the debugger. Thinking that perhaps the CDT was trying to use the whole string as the command name for gdb, I created a little C program locally that launches gdb on the remote machine with and passes the arguments onto the remote gdb. This didn't work either, even though I could successfully launch a remote gdb session just from the cygwin command line.
4) The binary parsers don't work for this case because they are local cygwin-based tools that have no access to the RSE filesystem in Eclipse. Also, the CDT doesn't provide any sort of customization for binary parsers, such that I could substitute a command like "ssh <host> addr2line" for addr2line.
So it seems this use case for remote development via CDT + RSE is only about 60% there.
|
|
|
Re: Remote C development [message #519500 is a reply to message #519469] |
Mon, 08 March 2010 22:14   |
Eclipse User |
|
|
|
Corey Ashford wrote on Mon, 08 March 2010 17:31 |
...4) The binary parsers don't work for this case because they are local cygwin-based tools that have no access to the RSE filesystem in Eclipse. Also, the CDT doesn't provide any sort of customization for binary parsers, such that I could substitute a command like "ssh <host> addr2line" for addr2line.
...
|
I was mistaken about this part. If I select GNU elf parser or Cygwin PE parser, I can modify the "addr2line" command to something else, but this functionality is broken because if you click OK after changing the command then re-open this dialog, the command goes back to its original setting of "addr2line". It doesn't appear to matter what I set that field to, it always returns to its original setting after clicking OK. So this is another bug. Even so, it's not clear that this could ever work, because I don't know what sort of pathname the CDT would provide to the binary parser. Is it an "rse://..." pathname or a raw, remote pathname or ... ? I have the same issue with the setting of the gdb command.
In general, CDT + RSE seems good enough to index and navigate C/C++ source code remotely, but it's not ready for prime time when it comes to building, executing or debugging remotely.
|
|
| |
Re: Remote C development [message #519717 is a reply to message #519518] |
Tue, 09 March 2010 13:33   |
Eclipse User |
|
|
|
Axel Mueller wrote on Tue, 09 March 2010 02:58 | Quote: | 3) I was unable to get remote debugging to work. I tried changing the command from "gdb" to "ssh <host> gdb", but I just get errors when attempting to launch the debugger. Thinking that perhaps the CDT was trying to use the whole string as the command name for gdb, I created a little C program locally that launches gdb on the remote machine with and passes the arguments onto the remote gdb. This didn't work either, even though I could successfully launch a remote gdb session just from the cygwin command line.
|
Debugging works with a gdbserver on the target host.
http://www.embedded-linux.co.uk/tutorial/eclipse-rse
|
Thanks for your reply.
If my remote machine's architecture is different from x86 (on my Windows machine), will a standard cygwin gdb work with gdbserver on the remote machine?
I suspect not, and that I would need a cross gdb built for the target architecture. The link you cited uses as an example an ARM architecture board, but they also have Windows-hosted development tools (such as gdb, I would assume) for that architecture.
So I think what you're saying is possible, if I build a cross-targeted gdb, but I'd rather not have to do that, particularly when I already have an integrated GNU tool chain on the remote machine. In my case, the remote machine is a server running Linux, not an embedded board.
The other alternative is to run Eclipse on the remote machine, and then access that Eclipse session via X or VNC, but that has some downsides as well, especially over connections with large amounts of latency.
|
|
| | |
Re: Remote C development [message #635760 is a reply to message #519717] |
Wed, 27 October 2010 22:20  |
Eclipse User |
|
|
|
I'm curious if you were successful at remote c/c++ building/debugging on a linux machine from a windows instance of eclipse. I have a RSE connection working, but have not been successful at getting a remote build/debugger working. Any help would be appreciated
|
|
|
Goto Forum:
Current Time: Wed May 14 02:47:30 EDT 2025
Powered by FUDForum. Page generated in 0.03667 seconds
|