This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Support of gdb for Windows 64 native systems
> Date: Wed, 17 Oct 2007 21:16:29 -0700
> From: Joel Brobecker <brobecker@adacore.com>
> Cc: Pedro Alves <pedro_alves@portugalmail.pt>, 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.