std.debug: fix stack trace iteration code

Previously, the stack trace iteration code was using the number of
frames collected as the number of frames to print, not recognizing the
fixed size of the buffer. So it would redundantly print items, matching
the total number of frames ever collected.

Now the iteration code is limited to the actual stack trace frame count,
and will not print duplicate frames.

Closes #2447
Closes #2151
9c12237d2dAndrew Kelley committed on 5/8/2019, 11:11:01 PMparenta4aee8b
1 file changedLine totals unavailable