Re: How do I patch my binary

Stan Shebs
2010-11-30T23:54:11Z

On 11/25/10 6:42 AM, Jonas Maebe wrote:
>
> On 25 Nov 2010, at 15:16, Marc Khouzam wrote:
>
>> Here is the XCode doc about Fix and Continue which explains it nicely
>> for a user:
>> http://developer.apple.com/library/mac/#documentation/DeveloperTools/Conceptual/XcodeDebugging/230-Modifying_Running_Code/modifying_running_code.html
>>
>
> Note that in the mean time that functionality has been deprecated by
> Apple, and may even have already been completely removed from the
> latest Xcode releases. It also never worked that well (hence the
> deprecation, I guess).

One of the critical aspects to making it work was that all references
were dynamic and indirected, so that everything could end up in
different locations after the fix and yet still be found when you
resumed execution. But that meant special compiler flags, and more
differences between "development" and "production" code. (I note the
contemporaneous discussion about compiler options for Linux.)

In the generic Linux/ELF/ABI etc context, I think it's going to be even
harder to make it work reliably enough for users to trust. Certainly it
was disappointing at Apple, to have put forth the coordinated effort and
then not seen much uptake.

Stan