Skip to content

Commit

Permalink
proc: support childless compile units in loadDebugInfoMaps (#1574)
Browse files Browse the repository at this point in the history
Childless compile units would confuse loadDebugInfoMaps.
No test because I don't know what causes go to invoke GNU As in such a
way that it produces a childless compile unit.

Fixes #1572
  • Loading branch information
aarzilli authored and derekparker committed Jun 11, 2019
1 parent 72fae3c commit cce3770
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/proc/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,9 @@ func (bi *BinaryInfo) loadDebugInfoMaps(image *Image, debugLineBytes []byte, wg
}
}
bi.compileUnits = append(bi.compileUnits, cu)
cu.endOffset = bi.loadDebugInfoMapsCompileUnit(ctxt, image, reader, cu)
if entry.Children {
cu.endOffset = bi.loadDebugInfoMapsCompileUnit(ctxt, image, reader, cu)
}

case dwarf.TagPartialUnit:
reader.SkipChildren()
Expand Down

0 comments on commit cce3770

Please sign in to comment.