Terminal incorrectly breaks lines and the Direct Remote Debugging plugin
Bugzilla Link | 570179 |
Status | NEW |
Importance | P3 normal |
Reported | Jan 07, 2021 11:04 EDT |
Modified | Jan 07, 2021 11:04 EDT |
Version | 4.5.100 |
Reporter | Matthias Reis |
Description
I am using the Direct Remote Debugging plugin (https://marketplace.eclipse.org/content/direct-remote-c-debugging) which can be used to run gdb (not gdbserver!) on a remote machine through a ssh shell. This plugin makes use of RSE among others.
Apologies in advance for this rather lengthy description.
When selecting the option "attach to a running process", Eclipse shows a list of processes running on the (remote) machine (screenshot here: https://wiki.eclipse.org/images/f/ff/MultiAttachDialog.png). However, one server I need to use has a lot of running processes and I noticed that the Eclipse process list is missing processes that are definitely running. I debugged the plugin and found out that the TerminalServicesShellOutputReader inserts a line break in the gdb process list output that makes the process list incomplete. The second line (in reality it is one line of gdb output) of the process list which can be seen from the console window in Eclipse is missing in the "Select process" window.
I found out that the bug can be fixed by increasing long waitIncrement from 500 to 5000 in interruptableReadLine() in the class TerminalServicesShellOutputReader. I am not sure this is a good fix but it works for me. Someone with better code knowledge should work on this.