In order to enable remote gdb through serial ports on two machines (both of them are installed as VM on Hyper-V), I connected the two host machine (Windows) through com ports, and I also enabled Windows named pipe for the two VM. I did an experiment and found something interesting.
Login the two VM through putty, suppose the two clients are A1 and B1 which connect VM A and VM B, and execute
Open a new putty client to connect, for example VM A again, the client is A2, and execute
Step 1:
A1:
B1:
Step 2:
A2:
A1 and B1's screen is flushed by "\r\n" and never stops the output.
Why does it happen?
Login the two VM through putty, suppose the two clients are A1 and B1 which connect VM A and VM B, and execute
cat /dev/cuau0
on both of them to pull information from serial ports.Open a new putty client to connect, for example VM A again, the client is A2, and execute
echo "hello" > /dev/cuau0
, then I observed the console of both A1 and B1 output quite a lot of information and the screen is always flush by "\r\n". I have stoped the output through "CTRL + C". The whole process is illustrated as follows:Step 1:
A1:
cat /dev/cuau0
B1:
cat /dev/cuau0
Step 2:
A2:
echo "hello" > /dev/cuau0
A1 and B1's screen is flushed by "\r\n" and never stops the output.
Why does it happen?