-
Notifications
You must be signed in to change notification settings - Fork 797
Add pivars command to FBClassDump.py #173
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
Conversation
kastiglione
commented
Nov 25, 2016
Thanks, and sorry for the late reply. This looks good, but I'm also wondering if we should consolidate pinternals and pivar? Should we discuss that now, or leave that for another time.
longv2go
commented
Nov 29, 2016
@kastiglione I notice that too. pinternals can not show the ivar`s offset, so I wrote this command. Sometimes I need the offset to inspect the object`s memory layout, and pivar need the ivar`s name, no name no working.
kastiglione
commented
Nov 30, 2016
Related, a command I came across last week is:
language objc class-table dump -v <regular-expression>
This prints ivars and their offsets, but it also prints methods too, which adds noise if you just want structure information.
longv2go
commented
Nov 30, 2016
@kastiglione I think we should to merge the pivars, pmethods, pproperties to one command.
class-dump <options> <arg>
if the arg is an instance of some class, it can show the ivar`s value of that instance. But there is more work to decode the struct infomation.
kastiglione
commented
Nov 14, 2017
@longv2go I'm following up on outstanding pull requests. Sorry for the long silence. Note that since this time, a -a flag was added to pinternals which calls the debugging helper _ivarDescription.
pivarscommand call theclass_copyIvarListto get all ivars of an Class and print them out. It would show the offset, type, name and value if need.