Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Jun 13, 2011, 03:49 PM   #1
devdog
macrumors newbie
 
Join Date: Jun 2011
gdb failure to launch

Xcode version 3.1.3 Debugger Console reads:
/bin/sh: line 0: exec: arch: not found
when attempting to launch a debug build of a simple command line application with a single breakpoint. Has anyone else had this happen?
devdog is offline   0 Reply With Quote
Old Jun 14, 2011, 10:01 PM   #2
numero
macrumors member
 
Join Date: Jul 2002
Location: OR
I'm on Intel and don't have a version of Xcode that can generate PPC code so I can't test this, but my first guess is that your target architecture isn't compatible with your current processor. My guess is you are on a PPC machine and you have only Intel builds selected.

Complete shot in the dark on this one.
numero is offline   0 Reply With Quote
Old Jun 15, 2011, 08:18 AM   #3
devdog
Thread Starter
macrumors newbie
 
Join Date: Jun 2011
My fault you're in the dark about host and target architecture - I should have mentioned that both are Intel. I still don't know the original cause but got around the problem by adding set start-with-shell 0 to my .gdbinit file.
devdog is offline   0 Reply With Quote
Old Jun 15, 2011, 11:56 PM   #4
numero
macrumors member
 
Join Date: Jul 2002
Location: OR
I didn't mean "shot in the dark" in the way that you didn't provide enough information in your original post. I probably wouldn't have thought to provide architecture info if I was reporting this problem. I meant it in the way of -- I've never encountered this problem, but if I did what might have caused it. I was making more of an educated guess than giving a solution from experience.

These "But that shouldn't happen" things are hard ones to figure out. Glad you found something to get around the problem.
numero is offline   0 Reply With Quote
Old Jun 16, 2011, 01:52 AM   #5
jiminaus
macrumors 65816
 
Join Date: Dec 2010
Location: Sydney
Quote:
Originally Posted by devdog View Post
My fault you're in the dark about host and target architecture - I should have mentioned that both are Intel. I still don't know the original cause but got around the problem by adding set start-with-shell 0 to my .gdbinit file.
If you're having to avoid the shell, perhaps there's a problem if your shell setup.

If you open Terminal and run the following command, what do you get:
Code:
echo $PATH
jiminaus is offline   0 Reply With Quote
Old Jun 16, 2011, 10:07 AM   #6
devdog
Thread Starter
macrumors newbie
 
Join Date: Jun 2011
Quote:
Originally Posted by jiminaus View Post
If you open Terminal and run the following command, what do you get:
Code:
echo $PATH
I get: /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin.
devdog is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Seagate SSHD failure + SATA cable failure? Blondie :) MacBook Pro 0 Apr 10, 2014 08:52 PM
Gdb Markov Mac Programming 5 Dec 2, 2012 05:23 PM
iPad Mini Launch Attracting Shorter Lines on Launch Day MacRumors MacRumors.com News Discussion 244 Nov 4, 2012 12:15 AM
Gdb can't step into function kefex Mac Programming 4 Sep 27, 2012 05:08 AM
Using gdb to debug an app but getting an error qtip2293 Mac Programming 2 Sep 22, 2012 04:56 PM

Forum Jump

All times are GMT -5. The time now is 10:23 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC