Skip to content

Commit

Permalink
fix: objc class method caching
Browse files Browse the repository at this point in the history
  • Loading branch information
blacktop committed Dec 15, 2023
1 parent 5bc0899 commit d7e22bc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions objc.go
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,7 @@ func (f *File) GetObjCClass(vmaddr uint64) (*objc.Class, error) {
if !info.Flags.IsMeta() {
if c, ok := f.GetObjC(classPtr.IsaVMAddr); ok {
isaClass = c.(*objc.Class)
cMethods = isaClass.InstanceMethods
} else {
isaClass, err = f.GetObjCClass(classPtr.IsaVMAddr)
if err != nil {
Expand Down Expand Up @@ -630,6 +631,7 @@ func (f *File) GetObjCClass2(vmaddr uint64) (*objc.Class, error) {
if !info.Flags.IsMeta() {
if c, ok := f.GetObjC(classPtr.IsaVMAddr); ok {
isaClass = c.(*objc.Class)
cMethods = isaClass.InstanceMethods
} else {
isaClass, err = f.GetObjCClass(classPtr.IsaVMAddr)
if err != nil {
Expand Down

0 comments on commit d7e22bc

Please sign in to comment.