Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

devdog

macrumors newbie
Original poster
Jun 13, 2011
3
0
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?
 

numero

macrumors regular
Jul 23, 2002
106
3
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.
 

devdog

macrumors newbie
Original poster
Jun 13, 2011
3
0
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.
 

numero

macrumors regular
Jul 23, 2002
106
3
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.
 

jiminaus

macrumors 65816
Dec 16, 2010
1,449
1
Sydney
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
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.