mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/compile: thread Curfn through to debuginfo
Updates #15756 Change-Id: I860dd45cae9d851c7844654621bbc99efe7c7f03 Reviewed-on: https://go-review.googlesource.com/38591 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
parent
3a1ce1085a
commit
6652572b75
5 changed files with 16 additions and 12 deletions
|
|
@ -553,7 +553,7 @@ func (c dwCtxt) AddSectionOffset(s dwarf.Sym, size int, t interface{}, ofs int64
|
|||
|
||||
// makeFuncDebugEntry makes a DWARF Debugging Information Entry
|
||||
// for TEXT symbol s.
|
||||
func makeFuncDebugEntry(ctxt *Link, s *LSym) {
|
||||
func makeFuncDebugEntry(ctxt *Link, curfn interface{}, s *LSym) {
|
||||
dsym := Linklookup(ctxt, dwarf.InfoPrefix+s.Name, int(s.Version))
|
||||
if dsym.Size != 0 {
|
||||
return
|
||||
|
|
@ -562,7 +562,7 @@ func makeFuncDebugEntry(ctxt *Link, s *LSym) {
|
|||
dsym.Set(AttrDuplicateOK, s.DuplicateOK())
|
||||
var vars []*dwarf.Var
|
||||
if ctxt.DebugInfo != nil {
|
||||
vars = ctxt.DebugInfo(s)
|
||||
vars = ctxt.DebugInfo(s, curfn)
|
||||
}
|
||||
dwarf.PutFunc(dwCtxt{ctxt}, dsym, s.Name, s.Version == 0, s, s.Size, vars)
|
||||
ctxt.Data = append(ctxt.Data, dsym)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue