Re: need way to debug tool called by popen--at startup
Re: need way to debug tool called by popen--at startup
- Subject: Re: need way to debug tool called by popen--at startup
- From: Alastair Houghton <email@hidden>
- Date: Thu, 30 Apr 2009 18:17:33 +0100
On 30 Apr 2009, at 18:08, Jonas Maebe wrote:
On 30 Apr 2009, at 18:35, Dennis Christopher wrote:
The problem I have is I want to debug an exception that occurs near
to the startup of the tool, and by the time I go through the Attach
step back in XCode the tool
is already past that point. Perhaps there is a way with gdb to do
this...? any suggestions would be
appreciated.
gdb -waitfor <processname>
(note that this works via some polling method)
Alternatively, you can add a sleep(10) or however long you need at
the beginning of the command line tool, so that you do get enough
time to attach gdb manually.
If it works on Mac OS X (and I have no idea if it does), you might
also be able to use GDB's follow-fork-mode for this purpose. Probably
not a good idea from the Xcode debugger though, as if it does work
it's liable to confuse Xcode (i.e. run GDB in Terminal instead).
Kind regards,
Alastair.
--
http://alastairs-place.net
_______________________________________________
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