Community
Participate
Working Groups
I just noticed that the C/C++ Remote Application launch (manual or automatic) adds the inferior process in the launch, and therefore has a dedicated console for that inferior. This is the case where we start gdbserver like this: gdbserver :9999 /home/marc/myBinary That console is useless since the I/O of the inferior is handled in the shell where gdbserver and the inferior are running. So, having this always empty console is not user-friendly. Furthermore, it causes a memory leak that I noticed when running over 140 Remote Junit tests. I suggest to remove that console by simply not adding the inferior to the launch. I believe we originally had the console as a side-effect of showing the inferior node in the Debug view, which required us to add it to the launch. Now that we don't show the inferior in the Debug view, there is no need to add it to the launch. This has always been the approach for a remote attach debug session.
Another problem with having the console, is that it is connect to GDB's I/O. That means that if the user types to that console, it will send the command to GDB, which is surprising. For example, pressing 'quit' in the inferior console will kill GDB. The reason this happens, is that for a remote session there is no PTY available, so the code uses GDB's IO. This makes sense for a local session, but not for a remote session, whose IO should not be handled by eclipse at all, thus, this bug.
Created attachment 210439 [details] Fix to not add an inferior to the launch for the remote case This patch checks if we are dealing with a remote session before creating an inferior process. I will commit to master.
Fixed
*** cdt git genie on behalf of Marc Khouzam *** Bug 370376: [remote] Remote non-attach should not have a console for the inferior [*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=ce342ee755ee0eeae46cf8f3b50e24bb36213043 *** cdt git genie on behalf of Marc Khouzam *** Bug 370376: [remote] Remote non-attach should not have a console for the inferior [*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=ce342ee755ee0eeae46cf8f3b50e24bb36213043