提交 cce37706 编写于 作者: A Alessandro Arzilli 提交者: Derek Parker

proc: support childless compile units in loadDebugInfoMaps (#1574)

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
上级 72fae3c9
......@@ -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()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册