debug/dwarf: compute ByteSize for more DWARF types

When a size attribute is not present for a type, we can still determine
the object size in some other cases: when the type is a Typedef
referring to another type, when the type embeds a Typedef, or when the
type is a pointer and we know the default address size.

Change-Id: Ie4ae12d1b968a6b8b4e37d13ffc7b479bc69b621
Reviewed-by: Rob Pike <>
3 files changed