This is the mail archive of the
mailing list for the GDB project.
CYGWIN file input redirection
- From: Steve Mucci <samsurfer117 at gmail dot com>
- To: gdb-patches at sourceware dot org
- Date: Mon, 26 Sep 2016 08:43:36 -0400
- Subject: CYGWIN file input redirection
- Authentication-results: sourceware.org; auth=none
I'm an amateur security researcher, and I mainly work with Windows and
the MinGW/CYGWIN/GoW toolset.
I've found in my studies a confirmed bug in the CYGWIN version of gdb;
It states that a command such as;
(gdb)run < input.txt
(gdb)args < input.txt
do not work.
I've heard that gdb on Windows creates processes with CreateProcess.
Fortunately from what I've found the STARTUPINFO structure contains
a field for standard input called;
Which would allow for directing standard input to I would assume
anything involving a handle.
Since I've also heard that CYGWIN handles the command line differently
than Linux, there are two files in particular that could be useful in solving
this problem located in the CYGWIN source.
target.c //For Linux command line
windows-nat.c //For Windows command line
Here are the MSDN pages for CreateProcess and STARTUPINFO;
How can we fix this bug?