• 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: Debugging a privileged process
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Debugging a privileged process


  • Subject: Re: Debugging a privileged process
  • From: email@hidden
  • Date: Tue, 27 Jan 2004 11:32:23 -0800

After the 'attach' you should use the menu 'Debug->Sync with debugger' to get the gui in sync.

-ChrisF

On Jan 26, 2004, at 2:42 PM, Kaelin Colclasure wrote:

I gave it a quick shot and I can indeed execute my process under the debugger and with the necessary privileges. But this does raise a few obvious questions like, "Where to Xcode's preferences get written?" Since the root user has no home directory, do these get sprayed into the root of the filesystem somewhere? (Nominally this a more of a generic Cocoa question, I suppose.)

And on a related topic, I am accustomed to being able to attach GDB to a running process (designated by PID) and start a debugging session that way. Yet I did not see any obvious option for doing this from Xcode... Did I just miss it, or should I file an enhancement request? :-)

There isn't any UI for doing this, but it is pretty easy to do. Open the inspector for the executable that you want to debug (just double-click on the name in the Executable section of the Group tree). Scroll down to the bottom, and in Launch Configuration, configure the Debug action, and set After Launching to "Do not start executable". Then start the debugger, go to the console and type


(gdb) attach PID

Ah yes, that works beautifully. Thanks!
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Debugging a privileged process (From: Kaelin Colclasure <email@hidden>)
 >Re: Debugging a privileged process (From: Jim Ingham <email@hidden>)
 >Re: Debugging a privileged process (From: Kaelin Colclasure <email@hidden>)

  • Prev by Date: Re: editing XML files
  • Next by Date: Re: Source trees & include paths
  • Previous by thread: Re: Debugging a privileged process
  • Next by thread: Headerdoc scripts
  • Index(es):
    • Date
    • Thread