• 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: FAQ: How do you debug a C++ Standard Tool Application?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FAQ: How do you debug a C++ Standard Tool Application?


  • Subject: Re: FAQ: How do you debug a C++ Standard Tool Application?
  • From: Jim Ingham <email@hidden>
  • Date: Sat, 25 Sep 2004 12:08:36 -0700


On Sep 24, 2004, at 7:32 PM, Eric Albert wrote:

On Sep 24, 2004, at 12:00 PM, Chris Espinosa wrote:

Use the standard Xcode trick to swap out running executables from under the Xcode (1.5) debugger:

1) Build your tool in Xcode.
2) Find the Executable that your target is going to run, and do Command-I
3) Go to the Debugging tab in the Info panel, and uncheck "Start executable after starting debugger"
4) Debug
5) In Terminal, launch your executable
6) In a separate Terminal window, use ps -axwww to find the PID of the process
6) Back in Xcode's debugger's gdb console, type "attach <PID>"

To make this a little bit easier, replace the last two steps with this:
6) Back in Xcode's debugger's gdb console, type "attach <name of your application>"
As long as you don't have multiple processes running with that name, this'll work. Oh, and gdb does tab expansion on the application name, so you usually just have to type the first few characters and hit tab.

Tab completion doesn't work in the Xcode console yet, sadly. Tab completion is on our list of things to do (I have already added the necessary support on the gdb side). But it isn't all wired up yet.


Still, Eric is right, if there is only one instance of the app running, you can use the name rather than the PID.

Jim
_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-
Jim Ingham email@hidden
Developer Tools - gdb


_______________________________________________
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: 
 >XCode 1.5: Can't debug after performing Deployment build (From: Robert Cerny <email@hidden>)
 >Re: XCode 1.5: Can't debug after performing Deployment build (From: Robert Cerny <email@hidden>)
 >How do you debug a C++ Standard Tool Application? (From: Richard Dunlap <email@hidden>)
 >Re: How do you debug a C++ Standard Tool Application? (From: Wade Tregaskis <email@hidden>)
 >Re: How do you debug a C++ Standard Tool Application? (From: Laurence Flath <email@hidden>)
 >Re: How do you debug a C++ Standard Tool Application? (From: Laurence Flath <email@hidden>)
 >FAQ: How do you debug a C++ Standard Tool Application? (From: Chris Espinosa <email@hidden>)
 >Re: FAQ: How do you debug a C++ Standard Tool Application? (From: Eric Albert <email@hidden>)

  • Prev by Date: Compiling for gcov with gcc 3.3
  • Next by Date: Re: How 'reliable' is MallocCheckHeap et al ?
  • Previous by thread: Re: FAQ: How do you debug a C++ Standard Tool Application?
  • Next by thread: Differences between building within the IDE and via xcodebuild
  • Index(es):
    • Date
    • Thread