protected void processChars(byte c) {
		switch (c) {
			case 0x08:
				if (lineBuf.get(lineBuf.position() - 1) == ' ') {
					lineBuf.position(lineBuf.position() - 1);
				}
				break;
			case '\n':
				//appendChar(c);
				bakeLine();
				break;
			case 0x1b:
				mode = Mode.ESC;
				break;
			default:
				appendChar(c);
				break;
		}
	}
There's not really a good way to know if any trailing space was intentional. For GDB/MI, that
doesn't really matter.
Ghidra/Framework/Pty/src/main/java/ghidra/pty/windows/AnsiBufferedInputStream.java