https://llvm.org/bugs/show_bug.cgi?id=30251
Bug ID: 30251
Summary: ioctl for request TIOCGWINSZ on STDOUT_FILENO not
working on OS X
Product: lldb
Version: unspecified
Hardware: Macintosh
OS: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: All Bugs
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected]
Classification: Unclassified
When debugging a process in LLDB using the ``process launch -c /bin/sh'', using
ioctl with request TIOCGWINSZ on STDOUT_FILENO always gives the width and
height of the window as zero and zero.
Test program:
#include <unistd.h>
#include <sys/ioctl.h>
#include <stdio.h>
void main(){
struct winsize tty_window_size;
ioctl(STDOUT_FILENO, TIOCGWINSZ, &tty_window_size);
printf("Rows: %i, Cols: %i\n", tty_window_size.ws_row,
tty_window_size.ws_col);
}
When run from terminal:
$ ./test_ioctl
Rows: 24, Cols: 80
$ lldb -v
lldb-320.4.156
$ lldb ./test_ioctl
(lldb) target create "./a.out"
(lldb) process launch -c /bin/sh
Rows: 0, Cols: 0
(lldb) q
--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
lldb-dev mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev