Debugging an arbitrary application
Debugging an arbitrary application
- Subject: Debugging an arbitrary application
- From: "Spotz, William F" <email@hidden>
- Date: Mon, 21 Apr 2008 15:34:54 -0600
Hi,
I am trying to use Xcode to debug an existing code. I can't even get
breakpoints in a simple "Hello World" to work. Here is what I do,
based on "Debugging Arbitrary Applications" in the Xcode User Guide:
1. Create hello:
$ cat hello.c
#include <stdio.h>
int main(int argc, char **argv)
{
printf("hello world\n");
return 0;
}
$ gcc -g -c hello.c
$ gcc -o hello hello.o
2. Create an empty project in Xcode.
3. Create an executable environment, named "hello", with an absolute
path to my program. In the "Debugging" tab, I set the "Additional
directories to find source files in" to my source directory.
4. I also add the source file directory to the project itself.
5. I set a breakpoint at the "printf" statement in hello.c.
6. In the debugger, I run the code. It prints "hello world" and exits
without stopping.
Am I missing something?
Thanks in advance.
** Bill Spotz **
** Sandia National Laboratories Voice: (505)845-0170 **
** P.O. Box 5800 Fax: (505)284-0154 **
** Albuquerque, NM 87185-0370 Email: 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