Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 312965 - ROV view of SysMin outbuf is garbled
Summary: ROV view of SysMin outbuf is garbled
Status: CLOSED FIXED
Alias: None
Product: RTSC
Classification: Technology
Component: Runtime (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Chris McCormick CLA
QA Contact:
URL:
Whiteboard: target:3.20
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-14 15:12 EDT by Ramsey Harris CLA
Modified: 2011-11-09 18:55 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ramsey Harris CLA 2010-05-14 15:12:25 EDT
There are two issues when viewing the SysMin outbuf data using ROV view.

1. The data is not unwrapped. The buffer is simply displayed from the beginning to the last string. But if the data in the buffer has wrapped around, then the data at the beginning of the buffer should be displayed after the data later in the buffer. This is obvious if you inspect the timestamps.

2. The last record is garbled. When an event record is written to the end of the buffer, such that it wraps around to the beginning of the buffer. The ROV view of this record is incomplete; it drops the part at the end of the buffer. Looking at SysMin.xs: viewInitOutputBuffer(), the for loop builds strings and adds them to elements[] only if the string ends with a '\n' character. The partial record at the end of the buffer will not have this character, so its never added to the elements array.
Comment 1 Chris McCormick CLA 2010-05-18 19:52:16 EDT
Fixed this in xdc-v32. 
Fixed the view in a few ways:
  - It will check the 'outidx' and 'wrapped' flags to determine how many characters are in the buffer. It won't read strings that have already been flushed.
  - It will unwrap the buffer and display the strings in the correct order. 
  - It will display the contents at the 'end' of the buffer even if they don't end in a newline.

I'm checking in an ROV test case for this in the regresstest tree in:
 regresstest/src/rovtests/xdcruntime/SysMinTest1.
Comment 2 Sasha Slijepcevic CLA 2010-05-28 16:37:44 EDT
I built the BIOS memory example with 64 bytes buffer for SysMin using 3.20.00.34. The output is longer than 64 bytes and ROV window displays it as:

e
eeSize = 512
totalFreeSize = 512
totalSize = 512

The memory buffer also contains the last added entry "Task complete" but its only displayed part is 'e' at the beginning of the ROV output. The rest of the last entry is at the end of the actual memory buffer, but is not displayed, as described in 2.

After building with 3.20.00.39, the content of the buffer in the memory is the same, but the ROV window displays it as:

eeSize = 512
totalFreeSize = 512
totalSize = 512
Task1 Complete 

That's what the last 64 bytes of the output should be.
Comment 3 Dave Russo CLA 2011-11-09 18:55:48 EST
closing "ancient" resolved bugs