• 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
FW: how do I attach to a running process in xcode - simple instructionsdon't work
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FW: how do I attach to a running process in xcode - simple instructionsdon't work


  • Subject: FW: how do I attach to a running process in xcode - simple instructionsdon't work
  • From: "Eric Fish" <email@hidden>
  • Date: Tue, 20 Mar 2007 13:03:05 -0800

 

The xcode (v2.4) doc on attaching to a running process does not adequately describe what I need to do in order to attach to a running process.? My goal is to use xcode for visual debugging of an executable compiled outside of the xcode environment,?using gcc with the -g option (to make it debuggable).? I do not have the luxury of launching this directly, but have to attach it once the process receives a request (the process is launched/controlled by another process).? ?Moreover, the project was not built via xcode, but through gcc/make.? The program was started via the terminal (shell).??

 

According to the doc below, all I have to do is select Debug...Attach... and then either select the program, if it appears, or select Process ID... and specify the pid.? ?I fire up xcode and do not open anything, and go straight to the attach operation.

 

The problem is, when selecting debug... nothing in the attach submenu is selectable (i.e. it's all dimmed out) - so I can't specify ?the Process ID. ?In another case, I was able to specify the pid, but xcode didn't successfully attach.

 

I know that in gdb, when doing command line mode attach operations, I have to specify symbol-file <executable> in order to associate the pid with a particular executable file - this works fine, I am able to set breakponts, walk through code, display variables, etc.

 

But I cannot do the equivalent in xcode.? ?Any help would be much appreciated, I have been pulling my hair out looking at the simplistic documentation below and can't find anything more on the web.

 

Regards, Eric

 

 

 

 

 

< Previous PageNext Page >

 

Attaching to a Running Process

You can use Xcode to attach to, and debug, a program that is already running. You can attach to a program running under Xcode or to any process running on the current computer for which you have a process ID. To attach the debugger to a running process perform one of the following operations:

  1. Choose a program from the Debug > Attach menu. This menu lists currently running programs launched from Xcode, identified by the program name and the name of the corresponding Xcode project. (This menu also lists other programs running on the system.) To attach to one of these programs, choose it from the menu.
  2. To attach to any other running process, choose Debug > Attach > Process ID. Enter the process ID of the process you want to attach to in the dialog that Xcode displays and press Return.
  3. Click the Attach toolbar item in the Run Log window to attach to a program already running in Xcode. Xcode automatically displays this window when you launch a program in Xcode.

When you launch a program from Xcode, you can also have Xcode automatically attempt to attach the debugger to the process when the program crashes. To do so, select the executable for the program, open an inspector, and select the ?Auto-attach debugger on crash? option in the Debugging pane.

 

 

 _______________________________________________
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: how do I attach to a running process in xcode - simple instructionsdon't work
      • From: Clark Goble <email@hidden>
  • Prev by Date: Re: A simple preprocessor question
  • Next by Date: Re: A simple preprocessor question
  • Previous by thread: Re: A simple preprocessor question
  • Next by thread: Re: how do I attach to a running process in xcode - simple instructionsdon't work
  • Index(es):
    • Date
    • Thread