Re: making the most of a symbolic breakpoint
Re: making the most of a symbolic breakpoint
- Subject: Re: making the most of a symbolic breakpoint
- From: Kyle Sluder <email@hidden>
- Date: Wed, 09 Jan 2013 09:29:22 -0800
On Jan 9, 2013, at 9:17 AM, Joel Reymont <email@hidden> wrote:
> Tech Note 2239 refers to 64-bit register details in Listing 10,
> Objective-C runtime 'secrets'. These details can be found here
>
> http://developer.apple.com/library/mac/#technotes/tn2124/_index.html
>
> It should be straightforward to translate to ARM and LLDB now.
One cannot blithely translate calling conventions into the terms of another architecture and expect things to always work.
The previous link you provided covers the simple case of four register-sized arguments. It doesn't cover a bunch of other important cases:
- Function calls with more than 4 arguments
- Floating-point arguments
- Aggregate (struct) or larger-than-register-size arguments
- Functions with variable arguments
- Functions that return floats or structs or other non-register-sized types
OS X follows the AMD64 Unix ABI, which defines the calling convention for these kinds of function calls in ways that don't necessarily map to ARM processors in use on iOS devices.
The standard ARM calling convention can be found here: http://infocenter.arm.com/help/topic/com.arm.doc.ihi0042e/IHI0042E_aapcs.pdf#page15
Sadly I can't find anything on the iOS Dev Center that assures me that iOS obeys the standard calling convention. This concern is real; for example, Windows does not obey the AMD64 calling convention on x86-64.
--Kyle Sluder
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden