Redirecting stdin under gdb

View: New views
5 Messages — Rating Filter:   Alert me  

Redirecting stdin under gdb

by Joe Crepeau :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

        I sent this out a few days ago and got no reply.  Does anybody have a response to this?


Has the problem with redirecting stdin under gdb been fixed? The most recent posting I can find is from 1999 and it was a known problem then.

The problem is when you start up gdb and then type the following:

run < input

where "input" is an input file located in the current directory.  gdb just sits there, apparently waiting for input.

According to the posting in 1999, the problem is because the "cmd arg parser in win32/gdb doesn't look for redirection symbols."

If there is no fix, is there a work-around so that I can use gdb in cygwin?

Thanks,
Joe


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Re: Redirecting stdin under gdb

by Dave Korn-6 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Joe Crepeau wrote:
> Hi,
>
> I sent this out a few days ago and got no reply.  Does anybody have a
> response to this?

  It's never worked for me either, and now thanks to you I know exactly why,
but I don't have any answer(*).  Sorry.

    cheers,
      DaveK

--
(*) - beyond "I'm working my way down the toolchain from one end to the other
and will get to gdb once I've finished with the compiler and binutils and fix
as much as I can there too, but that's an open-ended thing without any
predictable timescale."


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Re: Redirecting stdin under gdb

by Christopher Faylor-8 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Fri, Nov 06, 2009 at 01:00:13AM +0000, Dave Korn wrote:
>Joe Crepeau wrote:
>>I sent this out a few days ago and got no reply.  Does anybody have a
>>response to this?
>
>It's never worked for me either, and now thanks to you I know exactly
>why, but I don't have any answer(*).  Sorry.

I somehow missed the original message.

The problem has not been fixed.  It is exactly what was mentioned.  I do
have the beginnings of a fix in gdb already.

cgf

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


RE: Redirecting stdin under gdb

by Joe Crepeau :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



> -----Original Message-----
> From: cygwin-owner@... [mailto:cygwin-owner@...] On Behalf
> Of Christopher Faylor
> Sent: Thursday, November 05, 2009 6:29 PM
> To: cygwin@...
> Subject: Re: Redirecting stdin under gdb
>
> On Fri, Nov 06, 2009 at 01:00:13AM +0000, Dave Korn wrote:
> >Joe Crepeau wrote:
> >>I sent this out a few days ago and got no reply.  Does anybody have a
> >>response to this?
> >
> >It's never worked for me either, and now thanks to you I know exactly
> >why, but I don't have any answer(*).  Sorry.
>
> I somehow missed the original message.
>
> The problem has not been fixed.  It is exactly what was mentioned.  I do
> have the beginnings of a fix in gdb already.

That's good news.  Do you have an estimate for when this will be finished?  Is there a work-around in the meantime?

Below is the original message.

*****************************************************
Has the problem with redirecting stdin under gdb been fixed? The most recent posting I can find is from 1999 and it was a known problem then.

The problem is when you start up gdb and then type the following:

run < input

where "input" is an input file located in the current directory.  gdb just sits there, apparently waiting for input.

According to the posting in 1999, the problem is because the "cmd arg parser in win32/gdb doesn't look for redirection symbols."

If there is no fix, is there a work-around so that I can use gdb in cygwin?
*****************************************************


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Re: Redirecting stdin under gdb

by Christopher Faylor-8 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Fri, Nov 06, 2009 at 03:40:26PM +0000, Joe Crepeau wrote:

>> cgf wrote:
>> On Fri, Nov 06, 2009 at 01:00:13AM +0000, Dave Korn wrote:
>> >Joe Crepeau wrote:
>> >>I sent this out a few days ago and got no reply.  Does anybody have a
>> >>response to this?
>> >
>> >It's never worked for me either, and now thanks to you I know exactly
>> >why, but I don't have any answer(*).  Sorry.
>>
>>I somehow missed the original message.
>>
>>The problem has not been fixed.  It is exactly what was mentioned.  I
>>do have the beginnings of a fix in gdb already.
>
>That's good news.  Do you have an estimate for when this will be
>finished?  Is there a work-around in the meantime?

No, I have no ETA.  Sorry.  I'm trying to get gdb 7.0 released currently
and I don't want to make any more modifications right now.

As for a workaround, you can either build a debugging version of the
Cygwin DLL and then set "CYGWIN_DEBUG=yourprogram.exe" or you could
modify your program to wait a few seconds before it starts and then
attach to it with gdb.

Also, PLEASE don't include the full header of the message you're
replying to in the body of the message.  It is pointless duplication.
In particular:

http://cygwin.com/acronyms/#PCYMTNQREAIYR

cgf

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple