How to check assembly code of C program in Xcode 4

Discussion in 'Mac Programming' started by benthicwhale, Aug 4, 2011.

  1. benthicwhale macrumors newbie

    Joined:
    Jul 30, 2011
    #1
    Hello everyone.

    For example, I write a C program in Xcode4 and set a break point in the program, then run it. I want to see the assembly code of this C program。 How should I do it in Xcode4?

    Thank you very much.
     
  2. jiminaus macrumors 65816

    jiminaus

    Joined:
    Dec 16, 2010
    Location:
    Sydney
    #2
    Cursedly, this feature is missing from XCode 4. But the debug area is a live connection to GDB. Perhaps you can use the disas GDB command to get a disssembly for the instructions around the current instruction pointer.
     
  3. Kenndac macrumors 6502

    Kenndac

    Joined:
    Jun 28, 2003
    #3
    In Xcode 4.1:

    Product > Generate Output > Generate Assembly File.
     
  4. benthicwhale thread starter macrumors newbie

    Joined:
    Jul 30, 2011
    #4
    Thank you Kenndac adn jiminaus, both of you are so kind.
    And jiminaus, my last question, queried about how to include .h file in Xcode. I have figured out what should I do. You can check my reply in my thread. And is there any 'close this question' or 'this question has been solved' functions in this forum?
     
  5. jiminaus macrumors 65816

    jiminaus

    Joined:
    Dec 16, 2010
    Location:
    Sydney
    #5
    Click the edit button of your original post. Click Go Advanced. Drop down title to [Resolved]. Click Save.
     

Share This Page