Update
From CDT 9.4 (Eclipse Oxygen.2) there is now a checkbox in the launch configuration to do this with one-click. See https://wiki.eclipse.org/CDT/User/NewIn94#Debug

Original answer
The problem here is there are two readers on the same stdin channel. When you do cin
Eclipse CDT is also trying to read stdin for the GDB-MI communication.
Fortunately there is a workaround, you can have GDB create a separate console for the program that is running. That means no sharing of the handles.
To do so create a .gdbinit
file in the root of the project with these contents:
set new-console on
and debug your console app in Eclipse to your heart's content:

More Info
You can set the gdbinit file to use for your Debug Configuration in the Debugger tab. Set the GDB Command file to the name of the file you have created.

You can set the default GDB Command file to use for newly created Debug Configurations by editing the preference in C/C++ -> Debug -> GDB page:

Eclipse CDT does not use the .gdbinit in your home directory. This is on purpose because the .gdbinit that is there is normally set up for CLI debugging and can easily interfere with the MI inteface needed for Eclipse to communicate with GDB properly.