SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Sep 2010
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question lldb in Xcode debugger

    Hi all,

    I'm teaching myself iOS application development one thing that I have found is that often I get the message "lldb" in the debugger, none of the tutorails that I have been following seem to mention this. Am I doing something wrong is there a setting that I need to change?

    An example of a piece of code that I have created:

    Code Cpp:
    int main(int argc, const char * argv[])
    {
     
        void myFunction(NSArray *array);
        {
            for(NSInteger n = 0; n < 30; n++)
            {
                NSLog(@"The value of n is:%ld\n", n);
     
            }
        }
     
     
    }

    Thanks for any help.

  2. #2
    SitePoint Member
    Join Date
    Apr 2012
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by garydavison View Post
    Hi all,

    I'm teaching myself iOS application development one thing that I have found is that often I get the message "lldb" in the debugger, none of the tutorails that I have been following seem to mention this. Am I doing something wrong is there a setting that I need to change?

    An example of a piece of code that I have created:

    Code Cpp:
    int main(int argc, const char * argv[])
    {
     
        void myFunction(NSArray *array);
        {
            for(NSInteger n = 0; n < 30; n++)
            {
                NSLog(@"The value of n is:%ld\n", n);
     
            }
        }
     
     
    }

    Thanks for any help.
    What output are you getting? I don't see any quoted. Also, the code you wrote probably doesn't do what you expect. The line "void myFunction(NSArray *array);" really isn't doing anything at all. The semicolon at the end is making that line a function declaration, not a definition. So technically, what's happening is, you enter main(), skip the void line, enter the first brace (which isn't preceded by a conditional or loop, so it's just like its not there), running your for() loop from 0..29, and exiting without a return value.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •