DavidSpickett wrote:

> On Windows, the ConPTY emulates a PTY. The client's terminal (the one the 
> user is running lldb from) has to match the dimensions of the ConPTY so that 
> the debuggee (which is attached to the ConPTY) gets proper terminal 
> emulation. If there is a mismatch, lines will not wrap at the right column 
> and VT sequences will be out of place. In practice, in lldb, this results in 
> the (lldb) prompt being overwritten by the stdout of the debuggee.

How do you recreate this? I guess:
* Launch a terminal at default size.
* Resize it to non-default size.
* Launch lldb, launch the debugee
* See corrupted output

Which would mean the tests for this are anything that expected `(lldb)`, when 
run from a non-default terminal size.

Anyway it's good to include reproduction steps in case this PR does not fix the 
issue, or only partially fixes it.

> QSetSTDIOWindowSize:cols=N;rows=N, to send the dimension of the terminal to 
> the debuggee.

Maybe this is a silly question, but above the docs for this packet are 
https://lldb.llvm.org/resources/lldbgdbremote.html#qsetstdin-ascii-hex-path-qsetstdout-ascii-hex-path-qsetstderr-ascii-hex-path.

So here STDIO means stdout + stderr, right? stdin you don't have dimensions.

So if some application presented two different TUIs on stdout and stderr, in 
theory, both would have the correct size. (ofc for such an application you'd 
want to split it into different terminals anyway, but it's the only example I 
can think of)

https://github.com/llvm/llvm-project/pull/201141
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to