• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: when gdb runs a command line program, where does printf go?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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: "Ken G. Brown" <email@hidden>
  • Date: Mon, 5 May 2008 21:32:05 -0600

I did finally find the output gong to the gdb console, not sure exactly why it was not showing up at the beginning, but I had a few issues going on at the time.
I see now there is a setting in Project/Edit Active Executable/Debugging where you can select Pseudo terminal, Pipe, or System Console for standard input and output.
And I'm pretty sure I saw that sort of setting somewhere else too, but now I cannot find it.
Thx.

Ken

At 8:00 PM -0700 5/5/08, Jack Repenning wrote:
>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

References: 
 >when gdb runs a command line program, where does printf go? (From: "Ken G. Brown" <email@hidden>)
 >Re: when gdb runs a command line program, where does printf go? (From: Jack Repenning <email@hidden>)

  • Prev by Date: Re: when gdb runs a command line program, where does printf go?
  • Next by Date: Help: multiple warnings objc[x]:.....class XY is implemented in both....
  • Previous by thread: Re: when gdb runs a command line program, where does printf go?
  • Next by thread: Subdirectories in Framework Public Header
  • Index(es):
    • Date
    • Thread