• 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: 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
  • Follow-Ups:
    • Re: when gdb runs a command line program, where does printf go?
      • From: "Ken G. Brown" <email@hidden>
References: 
 >when gdb runs a command line program, where does printf go? (From: "Ken G. Brown" <email@hidden>)

  • Prev by Date: Re: <<PROJECTNAME>> in Executables
  • Next by Date: Re: when gdb runs a command line program, where does printf go?
  • Previous by thread: when gdb runs a command line program, where does printf go?
  • Next by thread: Re: when gdb runs a command line program, where does printf go?
  • Index(es):
    • Date
    • Thread