Re: debugging external makefile projects
Re: debugging external makefile projects
- Subject: Re: debugging external makefile projects
- From: "Thomas Blom" <email@hidden>
- Date: Wed, 7 Jan 2009 15:26:58 -0600
I've created the simplest test possible, and am still missing something.
1. created main.cpp, a simple hello world app using printf, and created a Makefile to build this. Builds a binary called 'hello' which runs fine from command line. (I've tried various flags in the makefile, including no flags, -g only, and other debug flags)
2. Create a New Project in XCode; chose "Other" as type, and then "External Build System"; name this project 'hello_xcode' (since hello is already existing in the folder - it's the binary)
3. Add a custom executable to project, supplying name & path to my hello binary. (Later aded "additional directories to find source in" even though they exist alongside binary: no difference)
4. Get Info on the target that was created (which is called hello_xcode), and supply the path to the Makefile. (later tried renaming to hello, but no difference)
5. right click on the project, and "Add Existing Files", then chose the single main.cpp, and set a breakpoint on the printf statement; looks ok.
6. Right click target & say "build & debug". Builds fine, runs fine, but the breakpoint, which was blue/enabled, becomes yellow/gold and the program runs to completion without stopping.
The same thing happens if I launch by right-clicking on the custom exe and say "Start with Breakpoints".
What am I missing here?
-thomas
On Tue, Jan 6, 2009 at 4:33 AM, Paul Russell
<email@hidden> wrote:
You need to add the source code to the project and you need to add the built executable as a custom executable, but other than that it should "just work".
Paul
On 5 Jan 2009, at 18:57, Thomas Blom wrote:
Is it possible to use the xcode graphical front-end to gdb (aka xcode debugger) to debug applications that have been built using an external makefile? I'm including the -g option to g++ to gen the debug info, but when I place break points in hte source, they are never respected by the debugger. This would seem to indicate that the debugger does not know that the source file in question is part of the application being launched for debug.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden