This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Building the 7.8.90 pretest on MinGW
- From: Pedro Alves <palves at redhat dot com>
- To: Eli Zaretskii <eliz at gnu dot org>
- Cc: dje at google dot com, gdb-patches at sourceware dot org
- Date: Thu, 22 Jan 2015 17:46:12 +0000
- Subject: Re: Building the 7.8.90 pretest on MinGW
- Authentication-results: sourceware.org; auth=none
- References: <announce dot 20150113122445 dot 36DDE48E8A at joel dot gnat dot com> <83vbk82fkg dot fsf at gnu dot org> <CADPb22TWRH+EBxr6i_kKX2NuVy9Gczo3v=FUWQGOFZqD9SpELA at mail dot gmail dot com> <83lhkyy84l dot fsf at gnu dot org> <54C0D965 dot 9000305 at redhat dot com> <83ppa6vlv1 dot fsf at gnu dot org> <54C12D62 dot 7070801 at redhat dot com> <83h9vivi7f dot fsf at gnu dot org>
On 01/22/2015 05:27 PM, Eli Zaretskii wrote:
>> Date: Thu, 22 Jan 2015 17:03:30 +0000
>> From: Pedro Alves <palves@redhat.com>
>> CC: dje@google.com, gdb-patches@sourceware.org
>>
>> No, I mean, start a shell buffer in emacs, start gdb within that,
>> and do "layout src".
>>
>> See https://sourceware.org/bugzilla/show_bug.cgi?id=17519.
>>
>> Could you try that?
>
> It says "TUI mode not allowed". (Tested in GDB 7.8.1 built with TUI,
> I don't have a newer binary where I type this.)
Ok, that's before my patch, but it means that isatty returned
false, so we're good after the patch too.
>
>>> Why would it? pipes fail the isatty test.
>>
>> Right. I recalled that Windows isatty returns true on all
>> sorts of character devices, like serial ports or the NUL device,
>> not just consoles, but confused pipes. Pipes are not one of
>> those. I see that gnulib has a isatty module that checks that
>> exactly -- it uses GetConsoleMode to make sure input is a real
>> console handle. We don't import that gnulib module presently, but
>> if we need that console check it sounds like importing that
>> module would be way to fix it.
>
> Fix what?
Let me rephrase it:
We don't import that gnulib module presently, but
if we need that console check it sounds like importing that
module would be way to add it.
Stress on the "IF".
> TUI doesn't need this fix. The only practical problem with
> MS runtime's isatty is that the null device doesn't fail it, but
> that's of a marginal importance for GDB, I think. That issue is
> important for filters and other batch-style programs where redirection
> to or from the null device is frequently used.
Since pipes already fail the isatty check, I agree it's of
marginal importance.
Thanks,
Pedro Alves