Community
Participate
Working Groups
The bug reproduces in the following scenario: 1. Byte order is specified in trace description and is different from native order. 2. At least one structure is defined, and its definition is placed before trace definition in metadata file. Actual behavior: Byte order defined in trace description does not propagate to structures, but only to basic types. The structure will have an incorrect byte_order. Cause: When reading byte_order in trace description, all previously defined types should be updated with the new byte order. In TraceDeclarationParser.java:setAlign(DeclarationScope, StructDeclaration, ByteOrder), if the field is of type IntegerDeclaration, a new field with the correct byte order is added. Because the field name already exists, this operation fails with a warning: !ENTRY org.eclipse.tracecompass.ctf.core 2 0 2017-10-05 16:48:10.766 !MESSAGE Struct already contains a field named <field_name> Fix: In this case, just update the existing field with the correct declaration. Workaround: In metadata, place trace description before structure definition.
Created attachment 270844 [details] CTF trace that reproduces the problem
This is interesting, I will try to put up a patch soon, could I use your trace in our regression tests?
Hi Luana, I'm a little backlogged at the moment, is the workaround sufficient for the short term?
Hi Matthew, Yes, feel free to use our trace for any needed tests. Also, the workaround is sufficient short term. Thank you, Luana