Skip to content

Commit

Permalink
debug/gosym: update field count to 1.20+
Browse files Browse the repository at this point in the history
  • Loading branch information
Zxilly committed May 9, 2024
1 parent dd6dee4 commit b1471ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/debug/gosym/pclntab.go
Original file line number Diff line number Diff line change
Expand Up @@ -467,10 +467,10 @@ func (f funcData) pcln() uint32 { return f.field(6) }
func (f funcData) cuOffset() uint32 { return f.field(8) }

// field returns the nth field of the _func struct.
// It panics if n == 0 or n > 9; for n == 0, call f.entryPC.
// It panics if n == 0 or n > 10; for n == 0, call f.entryPC.
// Most callers should use a named field accessor (just above).
func (f funcData) field(n uint32) uint32 {
if n == 0 || n > 9 {
if n == 0 || n > 10 {
panic("bad funcdata field")
}
// In Go 1.18, the first field of _func changed
Expand Down

0 comments on commit b1471ea

Please sign in to comment.