johnno1962 / Xtrace

Trace Objective-C method calls by class or instance
MIT License
1.83k stars 132 forks source link

Double Pointer arguments #6

Closed iamredeye closed 10 years ago

iamredeye commented 10 years ago

Hello Johno1962, Bug thanks for your help last time.

I have tried to intercept class method to get pointers to the response and error objets : NSURLResponse * response = nil; NSError * error = nil; NSLog(@"before sendSynchronousRequest"); NSData * data = [NSURLConnection sendSynchronousRequest:urlRequest returningResponse:&response error:&error];

As you see reponse and error are passed as reference variables to the method. I would like to get a pointer on them in the method "static void returning" so I can explore the values on these objects. I have tried to call "formatValue" method and explore the formatting that you have done to convert arguments but I can't really convert the argument object to NSURLResponse* object or NSError* object.

Thanks a lot, sorry for bothering.

johnno1962 commented 10 years ago

Hi, this isn’t realy a question about Xtrace so I’ll have to leave you to your own devices on this one. Pointers to pointers are always a thorny topic in C partticularly with ARC, You'll just have to experiment until you get it working.. J.