Skip to content

Commit

Permalink
Update pclntab.go
Browse files Browse the repository at this point in the history
  • Loading branch information
brigadier-general authored Jun 24, 2024
1 parent e11a030 commit cf6ae24
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions debug/gosym/pclntab.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ func (v version) String() string {
type LineTable struct {
Data []byte
PC uint64
GofuncVA uint64
Line int

// This mutex is used to keep parsing of pclntab synchronous.
Expand Down Expand Up @@ -172,8 +173,8 @@ func (t *LineTable) LineToPC(line int, maxpc uint64) uint64 {
// corresponding to the encoded data.
// Text must be the start address of the
// corresponding text segment.
func NewLineTable(data []byte, text uint64) *LineTable {
return &LineTable{Data: data, PC: text, Line: 0, funcNames: make(map[uint32]string), strings: make(map[uint32]string)}
func NewLineTable(data []byte, text uint64, gofunc uint64) *LineTable {
return &LineTable{Data: data, PC: text, GofuncVA: gofunc, Line: 0, funcNames: make(map[uint32]string), strings: make(map[uint32]string)}
}

// Go 1.2 symbol table format.
Expand Down Expand Up @@ -367,6 +368,7 @@ func (t *LineTable) go12Funcs() []Func {
f.LineTable = t
f.FrameSize = int(info.deferreturn())
f.FuncData = info
//f.GetInlinedCalls(info.data, t.GofuncVA)
syms[i] = Sym{
Value: f.Entry,
Type: 'T',
Expand Down

0 comments on commit cf6ae24

Please sign in to comment.