From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id MCuaCgg+d1+ULgAAWB0awg (envelope-from ) for ; Fri, 02 Oct 2020 10:49:44 -0400 Received: by simark.ca (Postfix, from userid 112) id 1E0DC1EF44; Fri, 2 Oct 2020 10:49:44 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 7D3D41E4B5 for ; Fri, 2 Oct 2020 10:49:43 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id AD48E386F823; Fri, 2 Oct 2020 14:49:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AD48E386F823 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1601650182; bh=8AurDG4f+HnhIG8Kf1H8N91QhXFiIAqAC+6AOZYaejY=; h=Date:To:In-Reply-To:Subject:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=tBEk/k7G+sBHSLfUhP0Fp5Lvkcok7OthzYau3d4PyfxVpqAwa4PbnXKF09XOPc4zW fj8L2dhKU8tAVKdKrj6kXrb0P1GEXGDBLz8Df2+aBbhK8iQFRs6NtP+cKyGTOf4hmN FDno4pkIv28ke5+H13SZ+fVGHLxw/t3G44nBbs+w= 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> To: Roy Qu 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-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: , From: Eli Zaretskii via Gdb-patches Reply-To: Eli Zaretskii Cc: gdb-patches@sourceware.org Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" [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.