diff options
| author | Jeremy Faller <jeremy@golang.org> | 2019-07-30 17:48:11 -0400 |
|---|---|---|
| committer | Jeremy Faller <jeremy@golang.org> | 2019-09-23 19:40:07 +0000 |
| commit | 376fc48338bfd05192ebb87cdbca8c0d74d23b6a (patch) | |
| tree | d6be922ff146081c874de53a3fba0884d28a4523 /src/cmd/internal/obj/objfile.go | |
| parent | f4ca3c1e0a2066ca4f7bd6203866d282ed34acf2 (diff) | |
| download | go-376fc48338bfd05192ebb87cdbca8c0d74d23b6a.tar.xz | |
cmd/compile: add new symbol for debug line numbers
This is broken out from: CL 187117
This new symbol will be populated by the compiler and contain debug line
information that's currently generated in the linker. One might say it's
sad to create a new symbol, but this symbol will replace the isStmt
symbols.
Testing: Ran go build -toolexec 'toolstash -cmp'
Change-Id: If8f7ae4b43b7247076605b6429b7d03a1fd239c5
Reviewed-on: https://go-review.googlesource.com/c/go/+/188238
Reviewed-by: Austin Clements <austin@google.com>
Diffstat (limited to 'src/cmd/internal/obj/objfile.go')
| -rw-r--r-- | src/cmd/internal/obj/objfile.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cmd/internal/obj/objfile.go b/src/cmd/internal/obj/objfile.go index a3281a99e4..65803ae29a 100644 --- a/src/cmd/internal/obj/objfile.go +++ b/src/cmd/internal/obj/objfile.go @@ -537,7 +537,7 @@ func isDwarf64(ctxt *Link) bool { return ctxt.Headtype == objabi.Haix } -func (ctxt *Link) dwarfSym(s *LSym) (dwarfInfoSym, dwarfLocSym, dwarfRangesSym, dwarfAbsFnSym, dwarfIsStmtSym *LSym) { +func (ctxt *Link) dwarfSym(s *LSym) (dwarfInfoSym, dwarfLocSym, dwarfRangesSym, dwarfAbsFnSym, dwarfIsStmtSym, dwarfDebugLines *LSym) { if s.Type != objabi.STEXT { ctxt.Diag("dwarfSym of non-TEXT %v", s) } @@ -551,9 +551,9 @@ func (ctxt *Link) dwarfSym(s *LSym) (dwarfInfoSym, dwarfLocSym, dwarfRangesSym, s.Func.dwarfAbsFnSym = ctxt.DwFixups.AbsFuncDwarfSym(s) } s.Func.dwarfIsStmtSym = ctxt.LookupDerived(s, dwarf.IsStmtPrefix+s.Name) - + s.Func.dwarfDebugLinesSym = ctxt.LookupDerived(s, dwarf.DebugLinesPrefix+s.Name) } - return s.Func.dwarfInfoSym, s.Func.dwarfLocSym, s.Func.dwarfRangesSym, s.Func.dwarfAbsFnSym, s.Func.dwarfIsStmtSym + return s.Func.dwarfInfoSym, s.Func.dwarfLocSym, s.Func.dwarfRangesSym, s.Func.dwarfAbsFnSym, s.Func.dwarfIsStmtSym, s.Func.dwarfDebugLinesSym } func (s *LSym) Len() int64 { @@ -577,7 +577,7 @@ func (ctxt *Link) fileSymbol(fn *LSym) *LSym { // TEXT symbol 's'. The various DWARF symbols must already have been // initialized in InitTextSym. func (ctxt *Link) populateDWARF(curfn interface{}, s *LSym, myimportpath string) { - info, loc, ranges, absfunc, _ := ctxt.dwarfSym(s) + info, loc, ranges, absfunc, _, _ := ctxt.dwarfSym(s) if info.Size != 0 { ctxt.Diag("makeFuncDebugEntry double process %v", s) } |
