From the example of hooking C++ methods with MobileSubstrate I found this:
void (*X_ZN20WebFrameLoaderClient23dispatchWillSendRequestEPN7WebCore14DocumentLoaderEmRNS0_15ResourceRequestERKNS0_16ResourceResponseE) (void* something, void* loader, unsigned long identifier, void* request, const void** response);
Why do we need this x_zn20…23….7…14 etc. between the names? What does this mean? I don’t think that this is the real name.
C++ mangles names of symbols emitted to the binary, to distinguish
void foo(int)andvoid foo(double). Also, on many platforms, it needs to encodeX::Ysomehow to make it an alphanumeric string. This adds the extra characters and is platform dependent.