diff --git a/pkg/proc/types.go b/pkg/proc/types.go index 00dec78117..63b304fcc3 100644 --- a/pkg/proc/types.go +++ b/pkg/proc/types.go @@ -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()