Skip to content

Commit

Permalink
fix: several small issues
Browse files Browse the repository at this point in the history
  • Loading branch information
blacktop committed Jun 2, 2024
1 parent 7c278cb commit 05c1fd2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
2 changes: 1 addition & 1 deletion file.go
Original file line number Diff line number Diff line change
Expand Up @@ -2184,7 +2184,7 @@ type BitstreamWrapperHeader struct {
func (f *File) GetEmbeddedLLVMBitcode() (*xar.Reader, error) {
llvmBundle := f.Section("__LLVM", "__bundle")
if llvmBundle == nil {
return nil, fmt.Errorf("no %s.%s section", llvmBundle.Seg, llvmBundle.Name)
return nil, fmt.Errorf("no %s.%s section", "__LLVM", "__bundle")
}
data, err := llvmBundle.Data()
if err != nil {
Expand Down
3 changes: 0 additions & 3 deletions objc.go
Original file line number Diff line number Diff line change
Expand Up @@ -1560,9 +1560,6 @@ func (f *File) GetCFStrings() ([]objc.CFString, error) {
cfstrings[idx].Class = c.(*objc.Class)
}
cfstrings[idx].Address = sec.Addr + uint64(idx*binary.Size(objc.CFString64Type{}))
if err != nil {
return nil, fmt.Errorf("failed to calulate cfstring vmaddr: %v", err)
}
}
}
}
Expand Down
8 changes: 2 additions & 6 deletions swift.go
Original file line number Diff line number Diff line change
Expand Up @@ -2605,15 +2605,11 @@ func (f *File) makeSymbolicMangledNameStringRef(addr uint64) (string, error) {
// part = fmt.Sprintf("<%s>", strings.TrimSuffix(strings.TrimPrefix(part, "y"), "G"))
part = strings.TrimSuffix(strings.TrimPrefix(part, "y"), "G")
} else if idx == len(parts)-1 { // last part
if strings.HasSuffix(part, "G") {
part = strings.TrimSuffix(part, "G")
}
part = strings.TrimSuffix(part, "G")
if part == "G" {
continue
}
if strings.HasPrefix(part, "_p") { // I believe this just means that it's a protocol
part = strings.TrimPrefix(part, "_p")
}
part = strings.TrimPrefix(part, "_p") // I believe this just means that it's a protocol
if (part == "Qz" || part == "Qy_" || part == "Qy0_") && len(out) == 2 {
tmp := out[0]
out[0] = out[1] + "." + tmp
Expand Down

0 comments on commit 05c1fd2

Please sign in to comment.