github.com/shogo82148/std@v1.22.1-0.20240327122250-4e474527810c/cmd/internal/obj/pcln.go (about) 1 // Copyright 2013 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 package obj 6 7 // PCIter iterates over encoded pcdata tables. 8 type PCIter struct { 9 p []byte 10 PC uint32 11 NextPC uint32 12 PCScale uint32 13 Value int32 14 start bool 15 Done bool 16 } 17 18 // NewPCIter creates a PCIter with a scale factor for the PC step size. 19 func NewPCIter(pcScale uint32) *PCIter 20 21 // Next advances it to the Next pc. 22 func (it *PCIter) Next() 23 24 // init prepares it to iterate over p, 25 // and advances it to the first pc. 26 func (it *PCIter) Init(p []byte)