Reputation: 6333
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);
}
Upvotes: 3
Views: 553
Reputation:
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.
Upvotes: 1
Reputation: 2587
@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.
Upvotes: 0
Reputation: 6803
Steps:
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.
Upvotes: 2