-
Notifications
You must be signed in to change notification settings - Fork 803
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add print capture variables for pblock #242
base: main
Are you sure you want to change the base?
Conversation
before: Imp: 0x10a451d40 Signature: void ^(); after: Imp: 0x10a451d40 Signature: void ^() Variables : { <ViewController: 0x7fdd9b204060> <AppDelegate: 0x60c00002acc0> };
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! This is a nice addition. I have some questions.
@@ -111,7 +111,7 @@ def run(self, arguments, options): | |||
struct Block_literal_1 real = *((__bridge struct Block_literal_1 *)$block); | |||
NSMutableDictionary *dict = (id)[NSMutableDictionary dictionary]; | |||
|
|||
[dict setObject:(id)[NSNumber numberWithLong:(long)real.invoke] forKey:@"invoke"]; | |||
[dict setValue:(id)[NSNumber numberWithLong:(long)real.invoke] forKey:@"invoke"]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why the change to setValue:forKey:
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
commands/FBClassDump.py
Outdated
json.update(variables_json) | ||
|
||
variablesStrs = [] | ||
for i in range(10): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why up to 10?
commands/FBClassDump.py
Outdated
print 'Imp: ' + hex(json['invoke']) + ' Signature: ' + sigStr | ||
print 'Imp: ' + hex(json['invoke']) + ' Signature: ' + sigStr + ' Variables : {\n'+variablesStr+'\n};' | ||
|
||
def getBlockVariables(self, block, min_var_count=1, max_var_count=20): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you explain min_var_count
and max_var_count
? I'm not clear on their purpose.
@kastiglione the related code
|
I think this is super useful! Is this something that is still in progress? If not, I'd be happy to take a stab at the implementation myself. |
before:
Imp: 0x10a451d40 Signature: void ^();
after:
Imp: 0x10a451d40 Signature: void ^() Variables : {
<ViewController: 0x7fdd9b204060>
<AppDelegate: 0x60c00002acc0>
};