• 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: Xcode debug follow fork
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Xcode debug follow fork


  • Subject: Re: Xcode debug follow fork
  • From: Greg Guerin <email@hidden>
  • Date: Fri, 14 Nov 2008 13:13:10 -0700

Jim Ingham wrote:

Then go to terminal & start up your app. Go back to Xcode and if the stars are correctly aligned, xcode should have attached to your program early in its startup code. Then you can continue from there and debug as you normally would.

One can also modify the app so it cooperates with debugging.

Early in the app's main(), look for a specific env-var, and if it's a specific value, call pause(). This will cause the process to suspend itself waiting for a specific signal. This should give plenty of time to attach gdb, setup state, send signals, etc., before sending the signal for the target process to resume.

See the man pages for getenv and pause.

  -- GG

_______________________________________________
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: Xcode debug follow fork
      • From: "Dee Ayy" <email@hidden>
  • Prev by Date: Re: Determining GUI ivar assignments in IB
  • Next by Date: Re: Xcode debug follow fork
  • Previous by thread: Re: Xcode debug follow fork
  • Next by thread: Re: Xcode debug follow fork
  • Index(es):
    • Date
    • Thread