From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id 2CFBB3865492 for ; Fri, 2 Oct 2020 14:49:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 2CFBB3865492 Received: from fencepost.gnu.org ([2001:470:142:3::e]:60610) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kOMNO-0005Do-Rh; Fri, 02 Oct 2020 10:49:39 -0400 Received: from [176.228.60.248] (port=4338 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kOMNO-0007qx-BA; Fri, 02 Oct 2020 10:49:38 -0400 Date: Fri, 02 Oct 2020 17:49:35 +0300 Message-Id: <83zh54el8g.fsf@gnu.org> From: Eli Zaretskii To: Roy Qu Cc: gdb-patches@sourceware.org In-Reply-To: (message from Roy Qu on Fri, 2 Oct 2020 21:58:13 +0800) Subject: Re: the redirected stdin/out/err for new console is wrong when the gdb's stdin/out/err is already redirected References: <83a6xam5uv.fsf@gnu.org> <83blhkg6v1.fsf@gnu.org> X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_20, KAM_DMARC_STATUS, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS, TXREP, URIBL_SBL, URIBL_SBL_A autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Oct 2020 14:49:41 -0000 [Please use Reply All to reply, so that the list is CC'ed.] > From: Roy Qu > 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.