• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Debugging an arbitrary application
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Debugging an arbitrary application


  • Subject: Re: Debugging an arbitrary application
  • From: Jim Ingham <email@hidden>
  • Date: Tue, 22 Apr 2008 10:19:45 -0700

Have you tried turning off "Load Symbols Lazily" in the Debugging Preferences of Xcode?

Jim

On Apr 21, 2008, at 2:34 PM, Spotz, William F wrote:
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

_______________________________________________ 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
  • Follow-Ups:
    • Re: Debugging an arbitrary application
      • From: "Bill Spotz" <email@hidden>
References: 
 >Debugging an arbitrary application (From: "Spotz, William F" <email@hidden>)

  • Prev by Date: Re: thin linking: "file is not of required architecture"
  • Next by Date: Re: thin linking: "file is not of required architecture"
  • Previous by thread: Re: Debugging an arbitrary application
  • Next by thread: Re: Debugging an arbitrary application
  • Index(es):
    • Date
    • Thread