How to debug this program with DDD?

I Want to debug,with DDD, a program getting input from stdin as in the
following:
ch=fgetc(stdin)

when the debugger reaches this line it probably enters in a loop waiting
for my input but I don’t know how to do it: DDD seems to not accept my
input nor in the console window neither in the output window.
So how can I send my input to DDD?

Thanks to all by Marco.

You can’t actually. It is a limitation with our gcc. I believe we have a
program
which works in conjunction with gcc that will solve this problem, but it has
yet
to be released.

“clubnet.tin.it” <ltredvi@tin.it> wrote in message
news:94fhq5$85i$1@inn.qnx.com

I Want to debug,with DDD, a program getting input from stdin as in the
following:
ch=fgetc(stdin)

when the debugger reaches this line it probably enters in a loop waiting
for my input but I don’t know how to do it: DDD seems to not accept my
input nor in the console window neither in the output window.
So how can I send my input to DDD?

Thanks to all by Marco.

clubnet.tin.it <ltredvi@tin.it> wrote:
: I Want to debug,with DDD, a program getting input from stdin as in the
: following:
: ch=fgetc(stdin)

: when the debugger reaches this line it probably enters in a loop waiting
: for my input but I don’t know how to do it: DDD seems to not accept my
: input nor in the console window neither in the output window.
: So how can I send my input to DDD?

: Thanks to all by Marco.

You should be able to run your program from a shell and
'attach ’ from gdb on another console at some point.
Not sure about ddd but there’s probably something similar.

-seanb

Chris Foran <cforan@qnx.com> wrote:

You can’t actually. It is a limitation with our gcc. I believe we have a
program
which works in conjunction with gcc that will solve this problem, but it has
yet
to be released.

That would be gdb, not gcc.

Actually, we’re working on a fix, and it will be ready soon. For the
meantime, use on -h to spawn your process in a held state, then
attach to it.

“clubnet.tin.it” <> ltredvi@tin.it> > wrote in message
news:94fhq5$85i$> 1@inn.qnx.com> …
I Want to debug,with DDD, a program getting input from stdin as in the
following:
ch=fgetc(stdin)

when the debugger reaches this line it probably enters in a loop waiting
for my input but I don’t know how to do it: DDD seems to not accept my
input nor in the console window neither in the output window.
So how can I send my input to DDD?

Thanks to all by Marco.


cburgess@qnx.com

I have the same problem with pdb but when i try to attach to it, pdb
returned to me
an error !!!


Colin Burgess a écrit dans le message <94hjo0$eik$1@nntp.qnx.com>…

Chris Foran <> cforan@qnx.com> > wrote:
You can’t actually. It is a limitation with our gcc. I believe we have
a
program
which works in conjunction with gcc that will solve this problem, but it
has
yet
to be released.

That would be gdb, not gcc.

Actually, we’re working on a fix, and it will be ready soon. For the
meantime, use on -h to spawn your process in a held state, then
attach to it.

“clubnet.tin.it” <> ltredvi@tin.it> > wrote in message
news:94fhq5$85i$> 1@inn.qnx.com> …
I Want to debug,with DDD, a program getting input from stdin as in the
following:
ch=fgetc(stdin)

when the debugger reaches this line it probably enters in a loop waiting
for my input but I don’t know how to do it: DDD seems to not accept my
input nor in the console window neither in the output window.
So how can I send my input to DDD?

Thanks to all by Marco.




\

cburgess@qnx.com

That would be gdb, not gcc.

oops