Re: when gdb runs a command line program, where does printf go?
Re: when gdb runs a command line program, where does printf go?
- Subject: Re: when gdb runs a command line program, where does printf go?
- From: Jack Repenning <email@hidden>
- Date: Mon, 5 May 2008 20:00:32 -0700
On May 2, 2008, at 7:53 PM, Ken G. Brown wrote:
How do I view output that goes to stdout and stderr?
printf goes to stdout, and stdout usually shows up in the gdb
console. But since you've looked there and didn't find it, it sounds
as if your program has reopened stdout and pointed it elsewhere -- so
you'd have to search the program to find out where.
There is some buffering involved in stdout I/O; perhaps the problem is
only that you've stopped the program after the printf statement, but
before the text has been flushed to the console? Try adding
fflush(stdout) right after the printf, and step clear past that, see
if you get your output.
-==-
Jack Repenning
email@hidden
Project Owner
SCPlugin
http://scplugin.tigris.org
"Subversion for the rest of OS X"
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden