Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii via Gdb-patches <gdb-patches@sourceware.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: Fri, 02 Oct 2020 17:49:35 +0300	[thread overview]
Message-ID: <83zh54el8g.fsf@gnu.org> (raw)
In-Reply-To: <CAKjWZNXxSfSKEcXMfK4P4NJtWtaP0t84k5W1VUEDqX5ofXLa6A@mail.gmail.com> (message from Roy Qu on Fri, 2 Oct 2020 21:58:13 +0800)


[Please use Reply All to reply, so that the list is CC'ed.]

> From: Roy Qu <royqh1979@gmail.com>
> Date: Fri, 2 Oct 2020 21:58:13 +0800
> 
> https://stackoverflow.com/questions/30494945/createprocess-with-new-console-window-but-override-some-std-i-o-handles
> 
> Point 1.You are right, NULL doesn't work under windows 7.
> So we need a better solution here.

OK.

> Point 2. When GDB's standard output is not redirected (started in console) , the inferior's ouput will go to it's
> own console, not the gdb's console.

Really?  I thought this happens only if you say

  (gdb) set new-console 1

If I'm wrong, then where is the code which causes that other console
to be created for the inferior?

> So if gdb's STDOUT is redirected,
> I think the inferior's output should go to it's own console ,too.

I'm asking whether we always want that.  I hope others who have
experience with running GDB on MS-Windows will chime in and comment on
this part.

Thanks.

  parent reply	other threads:[~2020-10-02 14:49 UTC|newest]

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

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