Debugging assembly language code on iOS with Xcode 3
Debugging assembly language code on iOS with Xcode 3
- Subject: Debugging assembly language code on iOS with Xcode 3
- From: Tom Seddon <email@hidden>
- Date: Tue, 19 Apr 2011 01:06:31 +0100
I posted this question on the Apple Developer Fora ( https://devforums.apple.com/thread/95946?tstart=50 ) to sounds of whistling wind and tumbleweed. It's assembly language related, so I appreciate this is a minority interest, but it seems to be an Xcode problem, so perhaps somebody here can assist?
My issue is that I'm having difficulty using Xcode 3.2.6 to debug ARM code running on the device, when the code is defined in its own .s file. The C code correctly calls the routine, and the correct result is obtained, but the debugger can't seem to work with it.
I can't seem to source-level single-step into the routine. If I try to single-step the call with Shift+Cmd+I, the call is just stepped over.
Additionally, any breakpoints I set in the ARM routine are simply ignored.
This appears to be specific to debugging ARM code on the device, rather than an inherent limitation in Xcode, because both of these things seem to work OK in an x86 or x64 OS X program and when running the x86 code on the simulator. In these cases, I can step through my assembly language code like I can my C code.
For now I am soldiering on with gcc's intrinsics, but the documentation for them is far from amazing, and the quality of the generated code is... a bit... patchy.
Anybody know if there's something I can do something to get assembly-language debugging working well in Xcode 3?
Thanks,
--Tom
P.S. the code I've got is as follows.
C code in a .c file:
#include <stdio.h>
int main(void) {
int test(void),x=test();//set breakpoint here then try Run, Step Into (Shift+Cmd+I)
printf("x=%d\n",x);
return 0;
}
x86/x64 code in a .s file:
.globl _test
_test:
movl $255,êx
ret
ARM code in a .s file:
.globl _test
_test:
mov r0,#255
mov pc,lr
_______________________________________________
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