How to view Objective-c( assembly code equivalent) at the break point?

How to view XCode( assembly code equivalent) at the break point?

I have gone to Thread1 and it shows objective-c for the [ViewController viewDidLoad] and then assembly for [UIViewController view] and [UIWindow makeKeyAndVisible]. I want to be able to see the assembly for [ViewController viewDidLoad] with the marker at the break pt?

(Product->GenerateOutput->Generate Assembly File: doesn't show the break pts.)

thx

void addme(int *a)
{
    *a += 0xFF;// <-- I want to see the assembly for this:  should see an instruction "ADD" in the assembly break down
    *a += 1;
    *a += 2;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    int a = 12;
    addme(&a);
}    

Answers


Steps:

  1. Put breakpoint where you want to see the assembly code
  2. Run program
  3. Once program pauses hit the button that looks like ->| (but pointing down)
  4. Repeat step 3 a lot
  5. Dance
  6. See the world
  7. Wonder at the joys of life
  8. Pop bottles
  9. Grow old
  10. Die

I'm not quite sure this is what you're asking for, but I just did it (well, steps 1-5 & 8) and it worked for me.

It's at the bottom of the screen, above the console.


And it's also likely that you won't see an assembly ADD instruction at all, since compile time constants are calculated and thus optimized away by the compiler at compile time.


@jdl At the matter of fact i don't know Objective-C and @Dustin doesn't know asm... As i understood viewDidLoad function will execute a code in it when some object is loaded. In my opinion you can compile only that part of code which you included in your question and look into assembly code via IDA pro for Mac OS or some other debugger.


Need Your Help

iPhone app update using a different developer account

iphone submission

I have an app which is available in app store and was signed with a certificate made from an account A. Now can I submit an update of the same app this time signing it with a different certificate