public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Jan Vrany <jan.vrany@fit.cvut.cz>
To: Eli Zaretskii <eliz@gnu.org>
Cc: "gdb@sourceware.org" <gdb@sourceware.org>,
	Tom Tromey <tom@tromey.com>,
	       Pedro Alves <palves@redhat.com>
Subject: Re: Readline on Windows (WAS: Re: [PATCH v2 0/2] MI: Add new command -complete]
Date: Tue, 12 Mar 2019 11:43:00 -0000	[thread overview]
Message-ID: <00bcca7dac745debdb0e06fe529afab137421f49.camel@fit.cvut.cz> (raw)
In-Reply-To: <835zsp5v5d.fsf@gnu.org>

On Mon, 2019-03-11 at 16:43 +0200, Eli Zaretskii wrote:
> > From: Jan Vrany <jan.vrany@fit.cvut.cz>
> > 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

      reply	other threads:[~2019-03-12 11:43 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87imynm3ia.fsf@tromey.com>
     [not found] ` <20190128124101.26243-1-jan.vrany@fit.cvut.cz>
     [not found]   ` <87pnrmnolt.fsf@tromey.com>
2019-02-21 16:05     ` [PATCH v2 0/2] MI: Add new command -complete Jan Vrany
2019-02-26 19:49       ` Tom Tromey
2019-02-27 10:41         ` Jan Vrany
2019-02-27 20:41         ` Pedro Alves
2019-02-28 10:18           ` Jan Vrany
2019-03-05 20:53             ` Pedro Alves
2019-03-06 15:09               ` Jan Vrany
2019-03-06 15:45                 ` Eli Zaretskii
2019-03-06 16:37                   ` Jan Vrany
2019-03-06 17:36                     ` Eli Zaretskii
2019-03-11  8:46                       ` Readline on Windows (WAS: Re: [PATCH v2 0/2] MI: Add new command -complete] Jan Vrany
2019-03-11 14:43                         ` Eli Zaretskii
2019-03-12 11:43                           ` Jan Vrany [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=00bcca7dac745debdb0e06fe529afab137421f49.camel@fit.cvut.cz \
    --to=jan.vrany@fit.cvut.cz \
    --cc=eliz@gnu.org \
    --cc=gdb@sourceware.org \
    --cc=palves@redhat.com \
    --cc=tom@tromey.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).