Skip to content
This repository was archived by the owner on Jan 25, 2018. It is now read-only.
This repository was archived by the owner on Jan 25, 2018. It is now read-only.

Support for getters/setters #3

@rodionovd

Description

@rodionovd

AFAIK, setters and getters are shared between all instances of a class in Swift. They seem to have the following structure:

const int foo_offset = 0x48;

int getFoo(void *self)
{
    return *(uinptr_t *)(self + foo_offset);
}


void setFoo(int new_value, void *self)
{
    // there will be release/retain for non-scalar types 
    // ...
   *(uintptr_t *)(self + foo_offset) = new_value;
}

So it's impossible (?) to hook a getter/setter for the only instance of a class.
Needs some research, though.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions