Bug 529429 - Starting the gdb server via telnet fails
Summary: Starting the gdb server via telnet fails
Status: NEW
Alias: None
Product: CDT
Classification: Tools
Component: cdt-debug (show other bugs)
Version: 9.3.1   Edit
Hardware: PC Windows 10
: P3 normal with 2 votes (vote)
Target Milestone: ---   Edit
Assignee: cdt-debug-inbox@eclipse.org CLA
QA Contact: Jonah Graham CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-04 13:00 EST by Stefan Franke CLA
Modified: 2022-07-24 03:31 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Franke CLA 2018-01-04 13:00:24 EST
Setup remote debugging to a remote gdb server and attempt to start it via telnet.

It will always fail, since the exitValue() method of the TelnetCommandShell will never throw an IllegalThreadStateException and thus the process is treated as closed.

As long the TelnetCommandShell is alive it must throw an IllegalThreadStateException in the exitValue() method as any real process does while the process is alive.

This is my fixed method:

	@Override
	public int exitValue() {
		if (protocol.isAlive())
			throw new IllegalThreadStateException();
		return 0;
	}