debug: Allow internal slice struct fields to be signed or unsigned ints.

The DWARF types of the "len" and "cap" fields of slices are changing to
signed int.  Accept both when reading slices from a debugged program.

We don't want the printer's error variable set with p.errorf in
peekUintStructField or peekIntStructField while trying the two types, so
remove those calls to errorf.  More specific errors are set by callers
when necessary anyway.

Change-Id: Ib38b77ee35082529f3673bb28b5096f20e2c5a18
Reviewed-by: Rob Pike <>
1 file changed