From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29678 invoked by alias); 18 Oct 2007 19:51:17 -0000 Received: (qmail 29670 invoked by uid 22791); 18 Oct 2007 19:51:16 -0000 X-Spam-Check-By: sourceware.org Received: from heller.inter.net.il (HELO heller.inter.net.il) (213.8.233.23) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 18 Oct 2007 19:51:13 +0000 Received: from HOME-C4E4A596F7 (IGLD-80-230-5-239.inter.net.il [80.230.5.239]) by heller.inter.net.il (MOS 3.7.3a-GA) with ESMTP id DWZ03869 (AUTH halo1); Thu, 18 Oct 2007 21:51:00 +0200 (IST) Date: Thu, 18 Oct 2007 20:20:00 -0000 Message-Id: From: Eli Zaretskii To: Joel Brobecker CC: pedro_alves@portugalmail.pt, uweigand@de.ibm.com, gdb-patches@sourceware.org In-reply-to: <20071018041629.GD2068@adacore.com> (message from Joel Brobecker on Wed, 17 Oct 2007 21:16:29 -0700) Subject: Re: Support of gdb for Windows 64 native systems Reply-to: Eli Zaretskii References: <200710161823.l9GIN1Vu023163@d12av02.megacenter.de.ibm.com> <47165541.90206@portugalmail.pt> <20071017194708.GC2068@adacore.com> <471685D3.7060402@portugalmail.pt> <20071018041629.GD2068@adacore.com> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2007-10/txt/msg00447.txt.bz2 > Date: Wed, 17 Oct 2007 21:16:29 -0700 > From: Joel Brobecker > Cc: Pedro Alves , uweigand@de.ibm.com, > gdb-patches@sourceware.org > > > I don't think it's a show-stopper, just a (temporary) lack of feature. > > For example, the DJGPP port was part of GDB for years before > > redirection support was added. > > If noone gets to it, I will probably implement it under the guidance > of someone who knows Windows well. Thanks, I will certainly try to help you, even if I cannot claim to "know Windows well". One idea, which I implemented for the DJGPP port years ago, is here: http://www.delorie.com/bin/cvsweb.cgi/djgpp/src/debug/common/dbgredir.c?rev=1.3 You can see how these routines are used in go32-nat.c. Note that some of the stuff in dbgredir.c is not needed for the Windows port: those are redir_to_child and redir_to_debugger, with all their subroutines. (The DJGPP port uses them because there GDB and the inferior run in the same process, so they share the file handles.) For Windows, I guess passing the redirected handles through the STARTUPINFO structure of the CreateProcess call, as suggested by Pedro, would be more than adequate.