From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 78629 invoked by alias); 12 Mar 2019 11:43:11 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 78621 invoked by uid 89); 12 Mar 2019 11:43:11 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_PASS autolearn=ham version=3.3.1 spammy=H*f:sk:83k1hcc, H*f:sk:f4bd9fd, H*f:sk:83bm2oc, H*f:sk:87pnrmn X-HELO: relay.fit.cvut.cz Received: from relay.fit.cvut.cz (HELO relay.fit.cvut.cz) (147.32.232.237) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 12 Mar 2019 11:43:09 +0000 Received: from imap.fit.cvut.cz (imap.fit.cvut.cz [147.32.232.238]) by relay.fit.cvut.cz (8.15.2/8.15.2) with ESMTPS id x2CBgnhc094254 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 12 Mar 2019 12:42:51 +0100 (CET) (envelope-from jan.vrany@fit.cvut.cz) Received: from sao (02d97c6d.bb.sky.com [2.217.124.109] (may be forged)) (authenticated bits=0 as user vranyj1) by imap.fit.cvut.cz (8.15.2/8.15.2) with ESMTPSA id x2CBgkhT076653 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Tue, 12 Mar 2019 12:42:48 +0100 (CET) (envelope-from jan.vrany@fit.cvut.cz) Message-ID: <00bcca7dac745debdb0e06fe529afab137421f49.camel@fit.cvut.cz> Subject: Re: Readline on Windows (WAS: Re: [PATCH v2 0/2] MI: Add new command -complete] From: Jan Vrany To: Eli Zaretskii Cc: "gdb@sourceware.org" , Tom Tromey , Pedro Alves Date: Tue, 12 Mar 2019 11:43:00 -0000 In-Reply-To: <835zsp5v5d.fsf@gnu.org> References: <87imynm3ia.fsf@tromey.com> <20190128124101.26243-1-jan.vrany@fit.cvut.cz> <87pnrmnolt.fsf@tromey.com> <6de282dee73cb44ae2016cb31254aa35c04e9816.camel@fit.cvut.cz> <87mumie3e2.fsf@tromey.com> <08b77764c3236cf652d981b3df1e78c185f6673e.camel@fit.cvut.cz> <825af91304d4a13bb6d599c16d68411fc6f37970.camel@fit.cvut.cz> <83k1hcc8hv.fsf@gnu.org> <0834b1321a1fc8fe6448d106d11a5d7be9e23933.camel@fit.cvut.cz> <83bm2oc4q3.fsf@gnu.org> <8b116a2bf5f9d7f60c64affab76d72a85b150a11.camel@fit.cvut.cz> <835zsp5v5d.fsf@gnu.org> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.5-1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2019-03/txt/msg00021.txt.bz2 On Mon, 2019-03-11 at 16:43 +0200, Eli Zaretskii wrote: > > From: Jan Vrany > > Cc: palves@redhat.com, tom@tromey.com, gdb@sourceware.org > > Date: Mon, 11 Mar 2019 08:45:55 +0000 > > > > Ah, sorry, I should have been more clear. I meant that it does not work > > for me EVEN when on standard console so I doubted it would work better over > > pipes much better. > > > > All the problems I described do happen when using standard console and never > > worked no matter which GDB I used (compiled by myself or by some third party). > > That's strange. Do you have some curses library installed, and if so, > does it get linked into GDB? No, this is the output of ldd: ntdll.dll => /c/WINDOWS/SYSTEM32/ntdll.dll (0x7fffba1c0000) KERNEL32.DLL => /c/WINDOWS/System32/KERNEL32.DLL (0x7fffb9520000) KERNELBASE.dll => /c/WINDOWS/System32/KERNELBASE.dll (0x7fffb6630000) msvcrt.dll => /c/WINDOWS/System32/msvcrt.dll (0x7fffb9770000) USER32.dll => /c/WINDOWS/System32/USER32.dll (0x7fffb95e0000) win32u.dll => /c/WINDOWS/System32/win32u.dll (0x7fffb7520000) GDI32.dll => /c/WINDOWS/System32/GDI32.dll (0x7fffb7d70000) gdi32full.dll => /c/WINDOWS/System32/gdi32full.dll (0x7fffb7280000) msvcp_win.dll => /c/WINDOWS/System32/msvcp_win.dll (0x7fffb6590000) ucrtbase.dll => /c/WINDOWS/System32/ucrtbase.dll (0x7fffb7420000) WS2_32.dll => /c/WINDOWS/System32/WS2_32.dll (0x7fffb9a50000) RPCRT4.dll => /c/WINDOWS/System32/RPCRT4.dll (0x7fffb77e0000) libgmp-10.dll => /mingw64/bin/libgmp-10.dll (0x6acc0000) libiconv-2.dll => /mingw64/bin/libiconv-2.dll (0x66000000) libintl-8.dll => /mingw64/bin/libintl-8.dll (0x61cc0000) ADVAPI32.dll => /c/WINDOWS/System32/ADVAPI32.dll (0x7fffb7e70000) sechost.dll => /c/WINDOWS/System32/sechost.dll (0x7fffb9460000) libexpat-1.dll => /mingw64/bin/libexpat-1.dll (0x68f40000) liblzma-5.dll => /mingw64/bin/liblzma-5.dll (0x63cc0000) libpython3.7m.dll => /mingw64/bin/libpython3.7m.dll (0x62300000) libwinpthread-1.dll => /mingw64/bin/libwinpthread-1.dll (0x64940000) VERSION.dll => /c/WINDOWS/SYSTEM32/VERSION.dll (0x7fffa9ac0000) > > > > Do you perhaps have a ~/.inputrc file, or some other local > > > customization, which might affect how Readline works? > > > > Not that I know of. There's no ".inputrc" nor "inputrc" on my Windows filesystem. > > I believe GDB compiled by myself uses the readline that comes with GDB. > > The .inputrc file doesn't come with Readline, it is a user init file > that you yourself can create to customize how input through readline > works. I know. I just double checked that there is none accidentally created. > > I compile GDB myself as well, also with its bundled readline, I use > GDB in the Windows console all the time, and I have no problems like > the ones you describe. Very strange. Strange indeed - but it is also good because this means that it "can". So I dug deeper and found --with-system-readline option (funny enough configure --help does not mention it) and voila, with this config it works well. This is ldd from "good" GDB: ntdll.dll => /c/WINDOWS/SYSTEM32/ntdll.dll (0x7fffba1c0000) KERNEL32.DLL => /c/WINDOWS/System32/KERNEL32.DLL (0x7fffb9520000) KERNELBASE.dll => /c/WINDOWS/System32/KERNELBASE.dll (0x7fffb6630000) msvcrt.dll => /c/WINDOWS/System32/msvcrt.dll (0x7fffb9770000) USER32.dll => /c/WINDOWS/System32/USER32.dll (0x7fffb95e0000) win32u.dll => /c/WINDOWS/System32/win32u.dll (0x7fffb7520000) GDI32.dll => /c/WINDOWS/System32/GDI32.dll (0x7fffb7d70000) gdi32full.dll => /c/WINDOWS/System32/gdi32full.dll (0x7fffb7280000) msvcp_win.dll => /c/WINDOWS/System32/msvcp_win.dll (0x7fffb6590000) ucrtbase.dll => /c/WINDOWS/System32/ucrtbase.dll (0x7fffb7420000) WS2_32.dll => /c/WINDOWS/System32/WS2_32.dll (0x7fffb9a50000) RPCRT4.dll => /c/WINDOWS/System32/RPCRT4.dll (0x7fffb77e0000) libgmp-10.dll => /mingw64/bin/libgmp-10.dll (0x6acc0000) libexpat-1.dll => /mingw64/bin/libexpat-1.dll (0x68f40000) libiconv-2.dll => /mingw64/bin/libiconv-2.dll (0x66000000) libintl-8.dll => /mingw64/bin/libintl-8.dll (0x61cc0000) ADVAPI32.dll => /c/WINDOWS/System32/ADVAPI32.dll (0x7fffb7e70000) sechost.dll => /c/WINDOWS/System32/sechost.dll (0x7fffb9460000) liblzma-5.dll => /mingw64/bin/liblzma-5.dll (0x63cc0000) libreadline7.dll => /mingw64/bin/libreadline7.dll (0x6e780000) libwinpthread-1.dll => /mingw64/bin/libwinpthread-1.dll (0x64940000) libpython3.7m.dll => /mingw64/bin/libpython3.7m.dll (0x62300000) VERSION.dll => /c/WINDOWS/SYSTEM32/VERSION.dll (0x7fffa9ac0000) libtermcap-0.dll => /mingw64/bin/libtermcap-0.dll (0x6ac40000) One problem less. Not that it explains why bundled readline does not work for me and does for you, but at least I can produce more usable gdb on Windows. Thanks a lot! Jan