Incorrect "No executable file specified" warning from Xcode 4

Originator:dairgrant
Number:rdar://10736610 Date Originated:2012/01/22
Status:Open Resolved:
Product:Developer Tools Product Version:4.2.1
Classification:Enhancement Reproducible:Always
 
I have a project created under Xcode 3.x, which was building a command line tool. The target type of this project was set incorrectly at some point, and was:

    productType = "com.apple.product-type.application";

The product did not have a bundle, Info.plist, or any of the other attributes of a bundled app; it just produced a single Mach-O executable. Despite this, the project could be built and debugged under Xcode 3 using gdb.


Under Xcode 4.2.1, the project builds but can not be debugged with gdb. The error produced is:

    No executable file specified.
    Use the "file" or "exec-file" command.

Switching to lldb allows the project to be debugged, as does editing the productType to the correct value for a command line tool:

    productType = "com.apple.product-type.tool";

Ideally gdb would give a more informative error, and project validation would indicate that the target type didn't match the product type (e.g., bundled app was requested but no bundle or Info.plist was being generated).

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!