Skip to content

Commit

Permalink
proc: support childless compile units in loadDebugInfoMaps
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 go-delve#1572
  • Loading branch information
aarzilli committed Jun 6, 2019
1 parent e012d49 commit 1c7d324
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 @@ -269,7 +269,9 @@ func (bi *BinaryInfo) loadDebugInfoMaps(image *Image, debugLineBytes []byte, wg
}
}
bi.compileUnits = append(bi.compileUnits, cu)
bi.loadDebugInfoMapsCompileUnit(ctxt, image, reader, cu)
if entry.Children {
bi.loadDebugInfoMapsCompileUnit(ctxt, image, reader, cu)
}

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

0 comments on commit 1c7d324

Please sign in to comment.