What is the right way to deploy files for a remote debug launch in Eclipse CDT?

余生颓废 提交于 2019-12-05 01:05:39

问题


My situation: I'm currently trying to use Eclipse CDT as a replacement for a proprietary IDE. I have an enterprise application, which consists of an executable and a lot (30+) of shared library modules. The application is targeted for an embedded non-x86 platform, with POSIX-compatible operating system (QNX or GNU/Linux, depending on the selected toolchain). Because of that, debugging can't be done on a developer's machine. It has to be done remotely.

I'm using Eclipse Luna / CDT 8.5 with Remote System Explorer plugin and GDB/DSF Create Process Launcher installed. By means of those plugins Eclipse can launch a program remotely and debug it with gdbserver. But only the main executable can be configured for upload.

I wonder what is an appropriate way to deploy files for a remote debug launch via Eclipse?

My current choices are:

  1. Using Remote System Explorer perspective, "import" some remote folder as a "Remote project" in the workspace. Set Makefile to copy .so files to the mapped folder after build. After build, manually refresh the "remote project". Then, files will be uploaded to remote system.
  2. Using Remote System Explorer perspective, "export" binaries located in workspace to remote file system, so that files would be uploaded at remote launch. This method also require me to "refresh" all the projects before starting a debug session, or changes wouldn't be noticied.
  3. Don't use Eclipse for file uploading at all, and deploy them manually or by means of the build script.
  4. Take the hard way and contribute some code to Eclipse СDT.

Is there a better solution?


回答1:


Does the system have SSH? SSH is great for sending files to remote machines. This is probably a bit much but you could create a custom eclipse plugin for this task if you really need to.




回答2:


How about using 'Command to execute before application' filed in Remote Application debug launch.

Host a FTP server on this host system and have an FTP client on target. Now write a command in 'Command to execute before application' to copy files from host to target via FTP. Since this command is executed before the application binary you would have the files on the target before application starts. Another option is you use SSH instead of FTP but that would require to create an account on your host that does not ask for authentication, because you would not be able to provide authentication using 'Command to execute before application'.



来源:https://stackoverflow.com/questions/27982763/what-is-the-right-way-to-deploy-files-for-a-remote-debug-launch-in-eclipse-cdt

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!