public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Roy Qu <royqh1979@gmail.com>
Cc: gdb-patches@sourceware.org
Subject: Re: the redirected stdin/out/err for new console is wrong when the gdb's stdin/out/err is already redirected
Date: Mon, 28 Sep 2020 15:40:56 +0300	[thread overview]
Message-ID: <83a6xam5uv.fsf@gnu.org> (raw)
In-Reply-To: <CAKjWZNXYLeQc0mamedvjKMZVmsh_0MMsradzQiVt+sSi6CwnSg@mail.gmail.com> (message from Roy Qu via Gdb-patches on Mon, 28 Sep 2020 20:21:38 +0800)

> Date: Mon, 28 Sep 2020 20:21:38 +0800
> From: Roy Qu via Gdb-patches <gdb-patches@sourceware.org>
> 
> I'm using gdb 9.2 of  mingw.org. (not mingw-w64)
> With "set new-console on", gdb will create a new console and run the
> debugged program in it.
> Commands like "run  < somefile" will redirect STDIN to the input of
> 'somefile', and the STDOUT should leave to the created console.
> 
> but when the gdb is running embedded in some IDE such as Dev-CPP and its
> STDIN/STDOUT/STDERR is already redirected into the host IDE,
> Console created by commands like "run < somefile" will inherit gdb's
> STDOUT/STDERR value and redirect all the output to host IDE too.
> (The running result should show in the debugged console, not in the IDE's
> debug log window)
> 
> So I create a patch to fix it.

Thanks.

I admit that I don't understand how the patch fixes the problem, and
what other effects it could have.  Could elaborate on each part of the
changes?  (Also, (HANDLE)0 is the same as NULL, isn't it?)

  reply	other threads:[~2020-09-28 12:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-28 12:21 Roy Qu
2020-09-28 12:40 ` Eli Zaretskii [this message]
     [not found]   ` <CAKjWZNWC3ZsR-D8ZPMS5qdhBg5WeWv0p=D9ncdAQua9aKYbSMg@mail.gmail.com>
2020-10-02 12:17     ` Eli Zaretskii
     [not found]       ` <CAKjWZNXxSfSKEcXMfK4P4NJtWtaP0t84k5W1VUEDqX5ofXLa6A@mail.gmail.com>
2020-10-02 14:49         ` Eli Zaretskii
     [not found]           ` <CAKjWZNXKFTKV7SsN066+bY-ocB32EC1gSSwbKO_Nqu9Dj8qzbQ@mail.gmail.com>
2020-10-02 19:50             ` Eli Zaretskii
2020-10-06 13:13               ` Roy Qu

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=83a6xam5uv.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=royqh1979@gmail.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).