From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 45906395ACF3 for ; Tue, 10 Mar 2020 22:23:50 +0000 (GMT) Received: from [172.16.0.95] (192-222-181-218.qc.cable.ebox.net [192.222.181.218]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 391101E4C2; Tue, 10 Mar 2020 18:23:49 -0400 (EDT) Subject: Re: [PATCH 20/24] Allow TUI windows in Python To: Tom Tromey , gdb-patches@sourceware.org References: <20200104183410.17114-1-tom@tromey.com> <20200104183410.17114-21-tom@tromey.com> From: Simon Marchi Message-ID: <4f60dcb3-1d6c-8660-12e0-fceea911bc10@simark.ca> Date: Tue, 10 Mar 2020 18:23:48 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <20200104183410.17114-21-tom@tromey.com> Content-Type: text/plain; charset=utf-8 Content-Language: tl Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Mar 2020 22:23:51 -0000 On 2020-01-04 1:34 p.m., Tom Tromey wrote: > This patch adds support for writing new TUI windows in Python. > > 2020-01-04 Tom Tromey > > * NEWS: Add entry for gdb.register_window_type. > * tui/tui-layout.h (window_factory): New typedef. > (tui_register_window): Declare. > * tui/tui-layout.c (saved_tui_windows): New global. > (tui_apply_current_layout): Use it. > (tui_register_window): New function. > * python/python.c (do_start_initialization): Call > gdbpy_initialize_tui. > (python_GdbMethods): Add "register_window_type" function. > * python/python-internal.h (gdbpy_register_tui_window) > (gdbpy_initialize_tui): Declare. > * python/py-tui.c: New file. > * Makefile.in (SUBDIR_PYTHON_SRCS): Add py-tui.c. > > gdb/doc/ChangeLog > 2020-01-04 Tom Tromey > > * python.texi (Python API): Add menu item. > (TUI Windows In Python): New node. > > gdb/testsuite/ChangeLog > 2020-01-04 Tom Tromey > > * gdb.python/tui-window.exp: New file. > * gdb.python/tui-window.py: New file. > > Change-Id: I85fbfb923a1840450a00a7dce113a05d7f048baa Hi Tom, On a system without ncurses installed, I get: $ make CXX python/py-tui.o In file included from /home/smarchi/src/binutils-gdb/gdb/python/py-tui.c:24: /home/smarchi/src/binutils-gdb/gdb/gdb_curses.h:47:10: fatal error: ncurses.h: No such file or directory 47 | #include | ^~~~~~~~~~~ So I suspect weare missing an #if/#ifdef somwhere. config.log contains: /* Define to 1 if you have the header file. */ /* #undef HAVE_NCURSESW_NCURSES_H */ /* Define to 1 if you have the header file. */ /* #undef HAVE_NCURSES_H */ /* Define to 1 if you have the header file. */ /* #undef HAVE_NCURSES_NCURSES_H */ Simon