Commit
f76a9135e27abf42cfa9805235faae263512c2f8
by Matthew Khouzamctf: only flatten structures, not arrays
The goal of the patch is to handle fixed-length strings and
have them parse in a human and machine readable way.
Previous implementations would flatten arrays to something like:
element[0]='H', element[1]='e'... etc..
This was done to accelerate the parsing of a trace. However, it
leads to developers needing to reconstiture events. This patch
changes the way it is done to have an array as follows:
element = "Hello World!" for an array of characters
element = [1,2,3,4,5,6....] for an array for bytes
element = [0x00, 0x01, 0x02....] for an array of hex bytes
The changes were needed as the array formatting was never implemented
as it was blocked by flattening of arrays.
[Changed] Handle fixed length strings in CTF
[Changed] Make event arrays output more "JSON"-like
[Changed] Improve byte array.toString() (Hex and decimal)
[Changed] CTF String fields will be formated surrounded by ""
Change-Id: I49c5e730cde6501732facd809d9282eec47a66f4
Signed-off-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/c/tracecompass/org.eclipse.tracecompass/+/202665
Tested-by: Trace Compass Bot <tracecompass-bot@eclipse.org>
Tested-by: Patrick Tasse <patrick.tasse@gmail.com>
Reviewed-by: Patrick Tasse <patrick.tasse@gmail.com>