Eclipse debug c/c++ program on Mac OS X

Today, I tried to debug a native program generated by an Eclipse project created from existed makefile. Eclipse complains: Program is not a recognized executable. Though it may run that app and I can debug it by invoking gdb in terminal.

And it is because Eclipse doesn’t use March-O 64 binary parser by default! There are official documents for how to change binary parser : http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.cdt.doc.user%2Ftasks%2Fcdt_t_proj_parser.htm

Then I notice there are some obvious difference after binary parser is right.

  • There are ” – [x86_64/le]” postfix for each executable.
  • When right clicking the binary in Project Explorer and clicking debug, there is “debug local c/c++ application” beside debug configurations.
  • In debug configurations,  search project button under C/C++ Application field in Main tab can list all executable.

Leave a Reply

Your email address will not be published. Required fields are marked *