• 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: setting breakpoint for all writes to stderr
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: setting breakpoint for all writes to stderr


  • Subject: Re: setting breakpoint for all writes to stderr
  • From: Eric Albert <email@hidden>
  • Date: Wed, 5 Apr 2006 13:06:55 -0700

On Apr 5, 2006, at 12:57 PM, Mark Lilback wrote:

I've got a program using a third-party library that is printing output to either stderr or stdout. When I set breakpoints on printf, fprintf, fwrite gdb never stops. Is there a way to break on any output to stdout/stderr no matter what function is called? Is there a low level primitive all output functions call?

They all go through write() -- 'man 2 write' for details. But that gets used for all writes, so it'll trap for all writes to disk, etc. You might want to set a conditional breakpoint on write with the first argument equal to 1 or 2 (stdout or stderr).


Hope this helps,
Eric

_______________________________________________
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: 
 >setting breakpoint for all writes to stderr (From: Mark Lilback <email@hidden>)

  • Prev by Date: Re: A Note on your ADC Confidentiality Agreement
  • Next by Date: GetKeys equivalent for Universal Binaries
  • Previous by thread: setting breakpoint for all writes to stderr
  • Next by thread: GetKeys equivalent for Universal Binaries
  • Index(es):
    • Date
    • Thread