Skip to content

Commit

Permalink
adding Gofunc field input to NewLineTable
Browse files Browse the repository at this point in the history
  • Loading branch information
brigadier-general authored Jun 10, 2024
1 parent 62070ed commit 0d5caca
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions objfile/objfile.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ func findAllOccurrences(data []byte, searches [][]byte) []int {
}

// previously: func (e *Entry) PCLineTable() (Liner, error)
func (e *Entry) PCLineTable(versionOverride string, knownPclntabVA uint64, knownGoTextBase uint64) ([]PclntabCandidate, error) {
func (e *Entry) PCLineTable(versionOverride string, knownPclntabVA uint64, knownGoTextBase uint64, knownGofuncVa uint64) ([]PclntabCandidate, error) {
// If the raw file implements Liner directly, use that.
// Currently, only Go intermediate objects and archives (goobj) use this path.

Expand Down Expand Up @@ -251,7 +251,11 @@ func (e *Entry) PCLineTable(versionOverride string, knownPclntabVA uint64, known
continue
}

parsedTable, err := gosym.NewTable(candidate.Symtab, gosym.NewLineTable(candidate.Pclntab, candidate.SecStart), versionOverride)
if knownGofuncVA != 0 {

Check failure on line 254 in objfile/objfile.go

View workflow job for this annotation

GitHub Actions / build

undefined: knownGofuncVA
candidate.Gofunc = knownGofuncVA

Check failure on line 255 in objfile/objfile.go

View workflow job for this annotation

GitHub Actions / build

candidate.Gofunc undefined (type PclntabCandidate has no field or method Gofunc)

Check failure on line 255 in objfile/objfile.go

View workflow job for this annotation

GitHub Actions / build

undefined: knownGofuncVA
}

parsedTable, err := gosym.NewTable(candidate.Symtab, gosym.NewLineTable(candidate.Pclntab, candidate.SecStart, candidate.Gofunc), versionOverride)

Check failure on line 258 in objfile/objfile.go

View workflow job for this annotation

GitHub Actions / build

too many arguments in call to gosym.NewLineTable

Check failure on line 258 in objfile/objfile.go

View workflow job for this annotation

GitHub Actions / build

candidate.Gofunc undefined (type PclntabCandidate has no field or method Gofunc)
if err != nil || parsedTable.Go12line == nil {
continue
}
Expand Down

0 comments on commit 0d5caca

Please sign in to comment.