debugger icon indicating copy to clipboard operation
debugger copied to clipboard

LLDB: stdin input is echoed twice

Open xusheng6 opened this issue 3 years ago • 0 comments

image

Both the ScriptingConsole and the LLDB echos the input, so we will get them twice.

In the screenshot, the target program is cat, which echoes the input, and the third echo is its output. This is expected behavior.

Although a workaround exists to check if the first half and the second half of the input is the same and only display one half of it. But this does not handle the case where the target program itself happens to print such a string. A better approach is to check whether LLDB support disabling echoing stdin input, or have the SciprtingConsole aware of the ScriptingProvider's behavior, and stop displaying the echo, along with the >> at the beginning.

xusheng6 avatar Oct 27 '22 06:10 xusheng6