64-bit application debug: posix_spawn error

Hi,

This looks like a recent change. From some time (I don't know exactly if it was 10.5.x or Xcode 3.1), when I start debugging any C++ x64_86 application, I read the following error:

GNU gdb 6.3.50-20050815 (Apple version gdb-960) (Sun May 18 18:38:33 UTC 2008)
...
Program loaded.
sharedlibrary apply-load-rules all
run
&"warning: posix_spawn failed, trying execvp, error: 86\n"


and then more or less the debugger works...
this "error 86" is defined in errno.h:

#define EBADARCH 86 /* Bad CPU type in executable */

and in fact I build explicitly specifying "x86_64" as architecture.
Oddly enough, if I say "compile using native architecture of this machine", it builds a 32bit executable, and if I build a "32/64 universal binary", it builds 4 times (intel/ppc * 32/64) but gdb debugs the intel x86 version, not the intel x64 (this is visible in Activity Monitor).
So it looks like after some upgrade, my MacBookPro started thinking it's a native 32-bit machine!

Any comments?
(not that I hope to get any reply here... I just post for desperation 😟

MacBook Pro 17", Mac OS X (10.5.5), XCode 3.1

Posted on Oct 6, 2008 1:32 AM

Reply
3 replies

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

64-bit application debug: posix_spawn error

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.