Skip to content

Commit

Permalink
fix: handle no funcs found edge case
Browse files Browse the repository at this point in the history
  • Loading branch information
blacktop committed Jul 23, 2024
1 parent 812665b commit 482b899
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions file.go
Original file line number Diff line number Diff line change
Expand Up @@ -1975,6 +1975,9 @@ func (f *File) GenerateFunctionStarts() ([]types.Function, error) {
})
}
}
if len(funcs) == 0 {
return nil, fmt.Errorf("failed to find any function starts by searching for 'pacibsp' prologues")
}
// set end addresses
for i := 0; i < len(funcs)-1; i++ {
funcs[i].EndAddr = funcs[i+1].StartAddr
Expand Down

0 comments on commit 482b899

Please sign in to comment.