Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Help! C program Debug error "Program is not a recognized executable." (debug error when trying to run debugger)
icon9.gif  Help! C program Debug error "Program is not a recognized executable." [message #696000] Wed, 13 July 2011 03:32 Go to next message
Will Khan is currently offline Will KhanFriend
Messages: 4
Registered: July 2011
Junior Member
Thanks in advance to anyone who can offer help!

My goal is to make a simple C program, like Hello World in C in eclipse Indigo. I've used visual studio in the past, but I'm new in Eclipse, and I'm generally not a bad learner. I've read in some documentation somewhere that eclipse CDT may not come with a debugger - this not 100% clear to me if I need to download something else ("The CDT doesn't include its internal debugger, but it offers a front end to GNU GDB debugger, which must be available locally.") -see bottom of this post to see what I did install.

I am running eclipse Indigo on a Mac (OS 10.6).
I have installed the CDK toolchain, among other software (see bottom of post)

With some experimenting, I got my program to build and run fine. But, when I try to run the debugger, I get the unhelpful message: "Program is not a recognized executable.". I made sure my launch configuration is pointing at the new output file created in the release and debug directories respectively. Interestingly enough, when I click "Search Project", everything is blank - there are no Binaries in the selection window when it asks 'Choose Program to Run'. This is the same situation for both the Debug and Release launch configurations.

Some more details:
I built both perspectives (Release & Debug). Both builds created what looks like to me, an output file. The thing is that I can successfully run the output, but not "debug" my code.

My current toolchain (for both debug and release builds) is Cross GCC and my current builder is GNU Makebuilder.

I have, as an option for the toolchain to use: Cross GCC, Cygwin GCC, Linux GCC, MacOS GCC, Microsoft Visual C++, MinGW GCC, and Solaris GCC.

I have, as options for my builder to use: CDT Internal Builder, Gnu Make Builder, and org.eclipse.linuxtools.cdt.autotools.core.toolchain.builder.

I've tried some different combinations of the toolchain and builder, but with the same result. Is there something else I should download or run? Any suggestions? This is driving me nuts! I can give more configuration details if requested. Here's all the eclipse software that I installed thus far.

Thanks for reading my post!
Will

software that I installed in Eclipse Indigo C/C++:

C/C++ Development Tools 8.0.0.201106081058 org.eclipse.cdt.feature.group Eclipse CDT
C/C++ Development Tools SDK 8.0.0.201106081058 org.eclipse.cdt.sdk.feature.group Eclipse CDT
C/C++ GNU Toolchain Debug Support 7.1.0.201106081058 org.eclipse.cdt.gnu.debug.feature.group Eclipse CDT
C/C++ Library API Documentation Hover Help (Incubation) 0.3.0.201106060936 org.eclipse.linuxtools.cdt.libhover.feature.group Eclipse Linux Tools
Eclipse Debugger for C/C++ 2.0.0.201106081058 org.eclipse.cdt.debug.edc.feature.group Eclipse CDT
Eclipse IDE for C/C++ Developers 1.4.0.20110615-0550 epp.package.cpp null

[Updated on: Wed, 13 July 2011 03:35]

Report message to a moderator

Re: Help! C program Debug error "Program is not a recognized executable." [message #696118 is a reply to message #696000] Wed, 13 July 2011 09:56 Go to previous messageGo to next message
malo_nj  is currently offline malo_nj Friend
Messages: 33
Registered: December 2010
Member
Like you noticed CDT has no debugger. Download and install GDB, or maybe you have one search for it, and just point to it in the Debugger tab of your launch configuration. The issue with Program is not a recognized executable you can add a new executable type under Window->Preferences->General->Content Types->Binary File. This is for eclipse helios but it should not be much different for indigo.
I didn't use eclipse on Mac but guess you have to chose MacOS GCC toolchain.
Re: Help! C program Debug error "Program is not a recognized executable." [message #696174 is a reply to message #696118] Wed, 13 July 2011 12:25 Go to previous message
Will Khan is currently offline Will KhanFriend
Messages: 4
Registered: July 2011
Junior Member
Hmmm... I noticed the output file for both the release and debug builds have no extensions. I checked the default extensions for binaries are .exe, .elf. and .out. Does anyone know what the extension should be for an output file, if any, when running eclipse on a Mac? Do you know where that would be set in Eclipse?
Thanks,
Will
Previous Topic:Makefile Project Tutorial Problems
Next Topic:Remote debugging without binary
Goto Forum:
  


Current Time: Thu Apr 25 20:02:37 GMT 2024

Powered by FUDForum. Page generated in 0.02825 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top