Add debug info traces

This patch adds a (real) final LTTng 2.8 debug info trace.  Fields
has_build_id and has_debug_link were added after the current debug info
trace was added, so we need a more up to date trace.

It also adds 3 synthetic traces used to test specific cases of debug
info analysis.

- exec: Used to test that a viewer properly handles a process doing an
  exec (forgets all previous mappings).
- two_processes: Used to test that a viewer properly handles debug info
  for two distinct processes.
- buildid_debuglink: Used to test that a viewer properly handles all
  combinations of binaries with/without build id/debug link.

This bumps the project's version to 1.5.0.

Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
Signed-off-by: Alexandre Montplaisir <alexmonthy@efficios.com>
diff --git a/ctf/pom.xml b/ctf/pom.xml
index ad4301d..118b885 100644
--- a/ctf/pom.xml
+++ b/ctf/pom.xml
@@ -15,7 +15,7 @@
   <parent>
     <groupId>org.eclipse.tracecompass.testtraces</groupId>
     <artifactId>tracecompass-test-traces-parent</artifactId>
-    <version>1.4.0</version>
+    <version>1.5.0</version>
   </parent>
 
   <artifactId>tracecompass-test-traces-ctf</artifactId>
diff --git a/ctf/src/main/java/org/eclipse/tracecompass/testtraces/ctf/CtfTestTrace.java b/ctf/src/main/java/org/eclipse/tracecompass/testtraces/ctf/CtfTestTrace.java
index b652318..8824ebd 100644
--- a/ctf/src/main/java/org/eclipse/tracecompass/testtraces/ctf/CtfTestTrace.java
+++ b/ctf/src/main/java/org/eclipse/tracecompass/testtraces/ctf/CtfTestTrace.java
@@ -235,7 +235,7 @@
     DEBUG_INFO("/debuginfo-test-app2", 41, 1),
 
     /**
-     * UST Trace with Debug Info information, final LTTng 2.8 version
+     * UST Trace with Debug Info information, LTTng 2.8-rc2 version
      *
      * <pre>
      * Trace Size: 144 KB (including index/)
@@ -243,10 +243,65 @@
      * Event count: 291
      * Trace length: ~2 s
      * </pre>
+     * 
+     * @deprecated Event fields has_debug_link and has_build_id have been added
+     *             after this trace was taken and before the final release.
      */
+    @Deprecated
     DEBUG_INFO3("/debuginfo-test-app3", 291, 2),
 
     /**
+     * UST Trace with Debug Info information, final LTTng 2.8 version
+     *
+     * <pre>
+     * Trace Size: 52 KB (including index/)
+     * Tracer: lttng-ust 2.8
+     * Event count: 32
+     * Trace length: ~1 s
+     * </pre>
+     */
+    DEBUG_INFO4("/debuginfo-test-app4", 32, 1),
+
+    /**
+     * Synthetic UST trace simulating a process doing an exec, with debug
+     * information events.
+     *
+     * <pre>
+     * Trace Size: 36 KB
+     * Tracer: Babeltrace CTF writer trying to impersonate lttng-ust 2.8
+     * Event count: 9
+     * Trace length: ~1 s
+     * </pre>
+     */
+    DEBUG_INFO_SYNTH_EXEC("/debuginfo-synth-exec", 9, 1),
+
+    /**
+     * Synthetic UST trace simulating two processes doing a statedump
+     * simultaneously, with debug information events.
+     *
+     * <pre>
+     * Trace Size: 36 KB
+     * Tracer: Babeltrace CTF writer trying to impersonate lttng-ust 2.8
+     * Event count: 12
+     * Trace length: ~1 s
+     * </pre>
+     */
+    DEBUG_INFO_SYNTH_TWO_PROCESSES("/debuginfo-synth-two-processes", 12, 1),
+
+    /**
+     * Synthetic UST trace simulating various combination of binaries with build
+     * IDs and debug links, with debug information events.
+     *
+     * <pre>
+     * Trace Size: 36 KB
+     * Tracer: Babeltrace CTF writer trying to impersonate lttng-ust 2.8
+     * Event count: 20
+     * Trace length: ~1 s
+     * </pre>
+     */
+    DEBUG_INFO_SYNTH_BUILDID_DEBUGLINK("/debuginfo-synth-buildid-debuglink", 20, 1),
+
+    /**
      * UST Trace with Memory analysis information
      *
      * <pre>
diff --git a/ctf/src/main/python/debuginfo_synth_buildid_debuglink.py b/ctf/src/main/python/debuginfo_synth_buildid_debuglink.py
new file mode 100644
index 0000000..a74b59d
--- /dev/null
+++ b/ctf/src/main/python/debuginfo_synth_buildid_debuglink.py
@@ -0,0 +1,62 @@
+from debuginfo_trace_writer import DebugInfoTraceWriter
+import sys
+
+'''
+Generate bin_info events with various combinations of buildid/debuglink.
+'''
+
+if len(sys.argv) < 2:
+    print("Please provide trace output path.", file=sys.stderr)
+    sys.exit(1)
+
+def timestamp_generator():
+    ts = 1
+    while True:
+        yield ts
+        ts += 1
+
+# Variables are suffixed with _AB, where A = build_id presence (y/n) and
+# B = debug link presence (y/n).
+
+vpid_nn = 1337
+vpid_yn = 1338
+vpid_ny = 1339
+vpid_yy = 1340
+
+ts = timestamp_generator()
+gen = DebugInfoTraceWriter(sys.argv[1])
+
+baddr = 0x400000
+memsz = 0x10000
+func_addr = baddr + 0x100
+
+def generate(vpid, build_id=None, debug_link=None):
+    has_build_id = build_id is not None
+    has_debug_link = debug_link is not None
+    
+    suffix = ('y' if has_build_id else 'n') + ('y' if has_debug_link else 'n')
+    
+    gen.write_lttng_ust_statedump_start(next(ts), 0, vpid)
+    gen.write_lttng_ust_statedump_bin_info(next(ts), 0, vpid, baddr, memsz,
+                                           '/tmp/foo_{}'.format(suffix),
+                                           has_build_id=has_build_id,
+                                           has_debug_link=has_debug_link)
+    if has_build_id:
+        gen.write_lttng_ust_statedump_build_id(next(ts), 0, vpid, baddr, build_id)
+
+    if has_debug_link:
+        gen.write_lttng_ust_statedump_debug_link(next(ts), 0, vpid, baddr, 0, debug_link)
+        
+    gen.write_lttng_ust_statedump_end(next(ts), 0, vpid)
+
+generate(vpid_nn)
+generate(vpid_yn, build_id='aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa')
+generate(vpid_ny, debug_link='/tmp/debug_link1')
+generate(vpid_yy, build_id='bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb', debug_link='/tmp/debug_link2')
+
+gen.write_dummy_event(next(ts), 0, vpid_nn, func_addr)
+gen.write_dummy_event(next(ts), 0, vpid_yn, func_addr)
+gen.write_dummy_event(next(ts), 0, vpid_ny, func_addr)
+gen.write_dummy_event(next(ts), 0, vpid_yy, func_addr)
+
+gen.flush()
diff --git a/ctf/src/main/python/debuginfo_synth_exec.py b/ctf/src/main/python/debuginfo_synth_exec.py
new file mode 100644
index 0000000..a9c9b26
--- /dev/null
+++ b/ctf/src/main/python/debuginfo_synth_exec.py
@@ -0,0 +1,45 @@
+from debuginfo_trace_writer import DebugInfoTraceWriter
+import sys
+
+'''
+Generate a trace simulating an exec.  When an exec happens, the address space
+of the process is reset (previously loaded libraries are not there anymore,
+and the main executable is replaced), so any know mapping should be forgotten.
+In the trace, this is represented by a new statedump (when the liblttng-ust.so
+library is loaded again in the new address space, its constructor is called
+again, which initiates a new statedump).
+'''
+
+if len(sys.argv) < 2:
+    print("Please provide trace output path.", file=sys.stderr)
+    sys.exit(1)
+
+def timestamp_generator():
+    ts = 1
+    while True:
+        yield ts
+        ts += 1
+
+vpid = 1337
+ts = timestamp_generator()
+gen = DebugInfoTraceWriter(sys.argv[1])
+
+baddr = 0x400000
+memsz = 0x10000
+
+gen.write_lttng_ust_statedump_start(next(ts), 0, vpid)
+gen.write_lttng_ust_statedump_bin_info(next(ts), 0, vpid, baddr, memsz, "/tmp/foo", 0, 0, 0)
+gen.write_lttng_ust_statedump_end(next(ts), 0, vpid)
+gen.write_dummy_event(next(ts), 0, vpid, 0x400100)
+
+baddr = 0x500000
+memsz = 0x10000
+
+gen.write_lttng_ust_statedump_start(next(ts), 0, vpid)
+gen.write_lttng_ust_statedump_bin_info(next(ts), 0, vpid, baddr, memsz, "/tmp/bar", 0, 0, 0)
+gen.write_lttng_ust_statedump_end(next(ts), 0, vpid)
+# This event should not map to anything currently loaded.
+gen.write_dummy_event(next(ts), 0, vpid, 0x400100)
+gen.write_dummy_event(next(ts), 0, vpid, 0x500100)
+
+gen.flush()
diff --git a/ctf/src/main/python/debuginfo_synth_two_processes.py b/ctf/src/main/python/debuginfo_synth_two_processes.py
new file mode 100644
index 0000000..b711fac
--- /dev/null
+++ b/ctf/src/main/python/debuginfo_synth_two_processes.py
@@ -0,0 +1,43 @@
+from debuginfo_trace_writer import DebugInfoTraceWriter
+import sys
+
+'''
+Generate a trace with two processes, to make sure that the viewer properly
+takes vpid into account.
+'''
+
+if len(sys.argv) < 2:
+    print("Please provide trace output path.", file=sys.stderr)
+    sys.exit(1)
+
+def timestamp_generator():
+    ts = 1
+    while True:
+        yield ts
+        ts += 1
+
+vpid1 = 1337
+vpid2 = 2001
+
+ts = timestamp_generator()
+gen = DebugInfoTraceWriter(sys.argv[1])
+
+baddr = 0x400000
+memsz = 0x10000
+function_addr = baddr + 0x100
+
+gen.write_lttng_ust_statedump_start(next(ts), 0, vpid1)
+gen.write_lttng_ust_statedump_start(next(ts), 0, vpid2)
+gen.write_lttng_ust_statedump_bin_info(next(ts), 0, vpid1, baddr, memsz, "/tmp/foo", has_build_id=True, has_debug_link=True)
+gen.write_lttng_ust_statedump_bin_info(next(ts), 0, vpid2, baddr, memsz, "/tmp/bar", has_build_id=True, has_debug_link=True)
+gen.write_lttng_ust_statedump_build_id(next(ts), 0, vpid2, baddr, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb")
+gen.write_lttng_ust_statedump_build_id(next(ts), 0, vpid1, baddr, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
+gen.write_lttng_ust_statedump_debug_link(next(ts), 0, vpid1, baddr, 0, "/tmp/debuglink1")
+gen.write_lttng_ust_statedump_debug_link(next(ts), 0, vpid2, baddr, 0, "/tmp/debuglink2")
+gen.write_lttng_ust_statedump_end(next(ts), 0, vpid1)
+gen.write_lttng_ust_statedump_end(next(ts), 0, vpid2)
+
+gen.write_dummy_event(next(ts), 0, vpid1, function_addr)
+gen.write_dummy_event(next(ts), 0, vpid2, function_addr)
+
+gen.flush()
diff --git a/ctf/src/main/python/debuginfo_trace_writer.py b/ctf/src/main/python/debuginfo_trace_writer.py
new file mode 100644
index 0000000..654ea6a
--- /dev/null
+++ b/ctf/src/main/python/debuginfo_trace_writer.py
@@ -0,0 +1,200 @@
+from babeltrace import CTFWriter
+import sys
+import binascii
+
+class DebugInfoTraceWriter:
+
+    def __init__(self, trace_path, num_cpus=1):
+        self.trace_path = trace_path
+        
+        # Create CTF writer object and boring administrative stuff.
+        self._create_writer()
+        
+        # Create some useful basic types.
+        self._define_base_types()
+        
+        # Define a stream class and its events.
+        self._define_stream_class()
+        self._define_events()
+
+        # Create one stream for each CPU.
+        self._streams = {}
+        for i in range(num_cpus):
+            self._create_stream(i)
+
+    def _create_writer(self):
+        self.writer = CTFWriter.Writer(self.trace_path)
+
+        self.clock = CTFWriter.Clock("A_clock")
+        self.clock.description = "Simple clock"
+        self.writer.add_clock(self.clock)
+
+        self.writer.add_environment_field("domain", "ust")
+        self.writer.add_environment_field("tracer_name", "lttng-ust")
+        self.writer.add_environment_field("tracer_major", 2)
+        self.writer.add_environment_field("tracer_minor", 8)
+
+    def _define_stream_class(self):
+        self.stream_class = CTFWriter.StreamClass("test_stream")
+        self.stream_class.clock = self.clock
+
+        # Add cpu_ip to existing stream packet context type
+        t = self.stream_class.packet_context_type
+        t.add_field(self.uint32_type, "cpu_id")
+        
+        # Define stream event context type
+        t = CTFWriter.StructureFieldDeclaration()
+        t.add_field(self.uint64_hex_type, "_ip")
+        t.add_field(self.int32_type, "_vpid")
+        self.stream_class.event_context_type = t
+
+    def _define_base_types(self):
+        self.int8_type = CTFWriter.IntegerFieldDeclaration(8)
+        self.int8_type.signed = True
+        self.int8_type.alignment = 8
+        
+        self.uint8_type = CTFWriter.IntegerFieldDeclaration(8)
+        self.uint8_type.signed = False
+        self.uint8_type.alignment = 8
+
+        self.int32_type = CTFWriter.IntegerFieldDeclaration(32)
+        self.int32_type.signed = True
+        self.int32_type.alignment = 8
+        
+        self.uint32_type = CTFWriter.IntegerFieldDeclaration(32)
+        self.uint32_type.signed = False
+        self.uint32_type.alignment = 8
+
+        self.uint64_type = CTFWriter.IntegerFieldDeclaration(64)
+        self.uint64_type.signed = False
+        self.uint64_type.alignment = 8
+
+        self.uint64_hex_type = CTFWriter.IntegerFieldDeclaration(64)
+        self.uint64_hex_type.signed = False
+        self.uint64_hex_type.alignment = 8
+        self.uint64_hex_type.base = 16
+        
+        self.string_type = CTFWriter.StringFieldDeclaration()
+        
+    def _define_events(self):
+        # Simply call all methods that start with define_
+        for name, func in sorted(self.__class__.__dict__.items()):
+            if name.startswith("define_"):
+                func(self)
+
+    def _create_stream(self, cpu_id):
+        stream = self.writer.create_stream(self.stream_class)
+        stream.packet_context.field("cpu_id").value = cpu_id
+        
+        self._streams[cpu_id] = stream
+
+    def _define_event(self, event):
+        self.stream_class.add_event_class(event)
+
+    def flush(self):
+        self.writer.flush_metadata()
+        
+        for stream in self._streams.values():
+            stream.flush()
+        
+    def _write_event(self, event, time_ms, cpu_id, vpid, ip):
+        stream = self._streams[cpu_id]
+
+        self.clock.time = time_ms * 1000000
+
+        event.stream_context.field("_vpid").value = vpid
+        event.stream_context.field("_ip").value = ip
+        
+        stream.append_event(event)
+
+    def define_lttng_ust_statedump_start(self):
+        self._lttng_ust_statedump_start = CTFWriter.EventClass("lttng_ust_statedump:start")
+        self._define_event(self._lttng_ust_statedump_start)
+
+    def write_lttng_ust_statedump_start(self, time_ms, cpu_id, vpid):
+        event = CTFWriter.Event(self._lttng_ust_statedump_start)
+        self._write_event(event, time_ms, cpu_id, vpid, 0)
+
+    def define_lttng_ust_statedump_bin_info(self):
+        self.lttng_ust_statedump_bin_info = CTFWriter.EventClass("lttng_ust_statedump:bin_info")
+        self.lttng_ust_statedump_bin_info.add_field(self.uint64_hex_type, "_baddr")
+        self.lttng_ust_statedump_bin_info.add_field(self.uint64_hex_type, "_memsz")
+        self.lttng_ust_statedump_bin_info.add_field(self.string_type, "_path")
+        self.lttng_ust_statedump_bin_info.add_field(self.uint8_type, "_is_pic")
+        self.lttng_ust_statedump_bin_info.add_field(self.uint8_type, "_has_build_id")
+        self.lttng_ust_statedump_bin_info.add_field(self.uint8_type, "_has_debug_link")
+        self._define_event(self.lttng_ust_statedump_bin_info)
+
+    def write_lttng_ust_statedump_bin_info(self, time_ms, cpu_id, vpid, baddr,
+                                           memsz, path, is_pic=False,
+                                           has_build_id=False,
+                                           has_debug_link=False):
+        event = CTFWriter.Event(self.lttng_ust_statedump_bin_info)
+
+        event.payload("_baddr").value = baddr
+        event.payload("_memsz").value = memsz
+        event.payload("_path").value = path
+        event.payload("_is_pic").value = 1 if is_pic else 0
+        event.payload("_has_build_id").value = 1 if has_build_id else 0
+        event.payload("_has_debug_link").value = 1 if has_debug_link else 0
+
+        self._write_event(event, time_ms, cpu_id, vpid, 0)
+
+    def define_lttng_ust_statedump_build_id(self):
+        self.lttng_ust_statedump_build_id = CTFWriter.EventClass("lttng_ust_statedump:build_id")
+        self.lttng_ust_statedump_build_id.add_field(self.uint64_hex_type, "_baddr")
+        self.lttng_ust_statedump_build_id.add_field(self.uint64_type, "__build_id_length")
+        
+        build_id_type = CTFWriter.SequenceFieldDeclaration(self.uint8_type, "__build_id_length")
+        
+        self.lttng_ust_statedump_build_id.add_field(build_id_type, "_build_id")
+        self._define_event(self.lttng_ust_statedump_build_id)
+
+    def write_lttng_ust_statedump_build_id(self, time_ms, cpu_id, vpid, baddr,
+                                           build_id):
+        build_id = list(binascii.unhexlify(build_id))
+    
+        event = CTFWriter.Event(self.lttng_ust_statedump_build_id)
+
+        event.payload("_baddr").value = baddr
+        event.payload("__build_id_length").value = len(build_id)
+        
+        build_id_field = event.payload("_build_id")
+        build_id_field.length = event.payload("__build_id_length")
+        
+        for i, value in enumerate(build_id):
+            build_id_field.field(i).value = value
+        
+        self._write_event(event, time_ms, cpu_id, vpid, 0)
+
+    def define_lttng_ust_statedump_debug_link(self):
+        self.lttng_ust_statedump_debug_link = CTFWriter.EventClass("lttng_ust_statedump:debug_link")
+        self.lttng_ust_statedump_debug_link.add_field(self.uint64_hex_type, "_baddr")
+        self.lttng_ust_statedump_debug_link.add_field(self.uint32_type, "_crc")
+        self.lttng_ust_statedump_debug_link.add_field(self.string_type, "_filename")
+        self._define_event(self.lttng_ust_statedump_debug_link)
+
+    def write_lttng_ust_statedump_debug_link(self, time_ms, cpu_id, vpid, baddr, crc, filename):
+        event = CTFWriter.Event(self.lttng_ust_statedump_debug_link)
+
+        event.payload("_baddr").value = baddr
+        event.payload("_crc").value = crc
+        event.payload("_filename").value = filename
+        
+        self._write_event(event, time_ms, cpu_id, vpid, 0)
+
+    def define_lttng_ust_statedump_end(self):
+        self._lttng_ust_statedump_end = CTFWriter.EventClass("lttng_ust_statedump:end")
+        self._define_event(self._lttng_ust_statedump_end)
+
+    def write_lttng_ust_statedump_end(self, time_ms, cpu_id, vpid):
+        event = CTFWriter.Event(self._lttng_ust_statedump_end)
+        self._write_event(event, time_ms, cpu_id, vpid, 0)
+
+    def define_dummy_event(self):
+        self._dummy_event = CTFWriter.EventClass("dummy_event")
+        self._define_event(self._dummy_event)
+
+    def write_dummy_event(self, time_ms, cpu_id, vpid, ip):
+        event = CTFWriter.Event(self._dummy_event)
+        self._write_event(event, time_ms, cpu_id, vpid, ip)
diff --git a/ctf/src/main/resources/debuginfo-synth-buildid-debuglink/metadata b/ctf/src/main/resources/debuginfo-synth-buildid-debuglink/metadata
new file mode 100644
index 0000000..1529891
--- /dev/null
+++ b/ctf/src/main/resources/debuginfo-synth-buildid-debuglink/metadata
@@ -0,0 +1,114 @@
+/* CTF 1.8 */
+
+trace {
+	major = 1;
+	minor = 8;
+	uuid = "cb38709b-0374-4cd1-9e92-58b8bfe1ebad";
+	byte_order = le;
+	packet.header := struct {
+		integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } magic;
+		integer { size = 8; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } uuid[16];
+		integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } stream_id;
+	} align(8);
+};
+
+env {
+	domain = "ust";
+	tracer_name = "lttng-ust";
+	tracer_major = 2;
+	tracer_minor = 8;
+};
+
+clock {
+	name = A_clock;
+	uuid = "c5909eb3-a83b-40cf-8875-6cbaec30da0b";
+	description = "Simple clock";
+	freq = 1000000000;
+	precision = 1;
+	offset_s = 0;
+	offset = 0;
+	absolute = FALSE;
+};
+
+stream {
+	id = 0;
+	event.header := struct {
+		integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } id;
+		integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; map = clock.A_clock.value; } timestamp;
+	} align(8);
+
+	packet.context := struct {
+		integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } timestamp_begin;
+		integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } timestamp_end;
+		integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } content_size;
+		integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } packet_size;
+		integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } events_discarded;
+		integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } cpu_id;
+	} align(8);
+
+	event.context := struct {
+		integer { size = 64; align = 8; signed = false; encoding = none; base = hexadecimal; byte_order = le; } _ip;
+		integer { size = 32; align = 8; signed = true; encoding = none; base = decimal; byte_order = le; } _vpid;
+	} align(8);
+};
+
+event {
+	id = 0;
+	name = "dummy_event";
+	stream_id = 0;
+	fields := struct {
+	} align(1);
+};
+
+event {
+	id = 1;
+	name = "lttng_ust_statedump:bin_info";
+	stream_id = 0;
+	fields := struct {
+		integer { size = 64; align = 8; signed = false; encoding = none; base = hexadecimal; byte_order = le; } _baddr;
+		integer { size = 64; align = 8; signed = false; encoding = none; base = hexadecimal; byte_order = le; } _memsz;
+		string { encoding = UTF8; } _path;
+		integer { size = 8; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } _is_pic;
+		integer { size = 8; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } _has_build_id;
+		integer { size = 8; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } _has_debug_link;
+	} align(8);
+};
+
+event {
+	id = 2;
+	name = "lttng_ust_statedump:build_id";
+	stream_id = 0;
+	fields := struct {
+		integer { size = 64; align = 8; signed = false; encoding = none; base = hexadecimal; byte_order = le; } _baddr;
+		integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } __build_id_length;
+		integer { size = 8; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } _build_id[__build_id_length];
+	} align(8);
+};
+
+event {
+	id = 3;
+	name = "lttng_ust_statedump:debug_link";
+	stream_id = 0;
+	fields := struct {
+		integer { size = 64; align = 8; signed = false; encoding = none; base = hexadecimal; byte_order = le; } _baddr;
+		integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } _crc;
+		string { encoding = UTF8; } _filename;
+	} align(8);
+};
+
+event {
+	id = 4;
+	name = "lttng_ust_statedump:end";
+	stream_id = 0;
+	fields := struct {
+	} align(1);
+};
+
+event {
+	id = 5;
+	name = "lttng_ust_statedump:start";
+	stream_id = 0;
+	fields := struct {
+	} align(1);
+};
+
diff --git a/ctf/src/main/resources/debuginfo-synth-buildid-debuglink/test_stream_0 b/ctf/src/main/resources/debuginfo-synth-buildid-debuglink/test_stream_0
new file mode 100644
index 0000000..bfd4cbd
--- /dev/null
+++ b/ctf/src/main/resources/debuginfo-synth-buildid-debuglink/test_stream_0
Binary files differ
diff --git a/ctf/src/main/resources/debuginfo-synth-exec/metadata b/ctf/src/main/resources/debuginfo-synth-exec/metadata
new file mode 100644
index 0000000..c6efb56
--- /dev/null
+++ b/ctf/src/main/resources/debuginfo-synth-exec/metadata
@@ -0,0 +1,114 @@
+/* CTF 1.8 */
+
+trace {
+	major = 1;
+	minor = 8;
+	uuid = "4292cf17-9125-44c0-97d5-0504bf8a8787";
+	byte_order = le;
+	packet.header := struct {
+		integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } magic;
+		integer { size = 8; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } uuid[16];
+		integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } stream_id;
+	} align(8);
+};
+
+env {
+	domain = "ust";
+	tracer_name = "lttng-ust";
+	tracer_major = 2;
+	tracer_minor = 8;
+};
+
+clock {
+	name = A_clock;
+	uuid = "61c821b0-890c-4c58-8770-c46b764b3a49";
+	description = "Simple clock";
+	freq = 1000000000;
+	precision = 1;
+	offset_s = 0;
+	offset = 0;
+	absolute = FALSE;
+};
+
+stream {
+	id = 0;
+	event.header := struct {
+		integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } id;
+		integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; map = clock.A_clock.value; } timestamp;
+	} align(8);
+
+	packet.context := struct {
+		integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } timestamp_begin;
+		integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } timestamp_end;
+		integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } content_size;
+		integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } packet_size;
+		integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } events_discarded;
+		integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } cpu_id;
+	} align(8);
+
+	event.context := struct {
+		integer { size = 64; align = 8; signed = false; encoding = none; base = hexadecimal; byte_order = le; } _ip;
+		integer { size = 32; align = 8; signed = true; encoding = none; base = decimal; byte_order = le; } _vpid;
+	} align(8);
+};
+
+event {
+	id = 0;
+	name = "dummy_event";
+	stream_id = 0;
+	fields := struct {
+	} align(1);
+};
+
+event {
+	id = 1;
+	name = "lttng_ust_statedump:bin_info";
+	stream_id = 0;
+	fields := struct {
+		integer { size = 64; align = 8; signed = false; encoding = none; base = hexadecimal; byte_order = le; } _baddr;
+		integer { size = 64; align = 8; signed = false; encoding = none; base = hexadecimal; byte_order = le; } _memsz;
+		string { encoding = UTF8; } _path;
+		integer { size = 8; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } _is_pic;
+		integer { size = 8; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } _has_build_id;
+		integer { size = 8; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } _has_debug_link;
+	} align(8);
+};
+
+event {
+	id = 2;
+	name = "lttng_ust_statedump:build_id";
+	stream_id = 0;
+	fields := struct {
+		integer { size = 64; align = 8; signed = false; encoding = none; base = hexadecimal; byte_order = le; } _baddr;
+		integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } __build_id_length;
+		integer { size = 8; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } _build_id[__build_id_length];
+	} align(8);
+};
+
+event {
+	id = 3;
+	name = "lttng_ust_statedump:debug_link";
+	stream_id = 0;
+	fields := struct {
+		integer { size = 64; align = 8; signed = false; encoding = none; base = hexadecimal; byte_order = le; } _baddr;
+		integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } _crc;
+		string { encoding = UTF8; } _filename;
+	} align(8);
+};
+
+event {
+	id = 4;
+	name = "lttng_ust_statedump:end";
+	stream_id = 0;
+	fields := struct {
+	} align(1);
+};
+
+event {
+	id = 5;
+	name = "lttng_ust_statedump:start";
+	stream_id = 0;
+	fields := struct {
+	} align(1);
+};
+
diff --git a/ctf/src/main/resources/debuginfo-synth-exec/test_stream_0 b/ctf/src/main/resources/debuginfo-synth-exec/test_stream_0
new file mode 100644
index 0000000..650b2c4
--- /dev/null
+++ b/ctf/src/main/resources/debuginfo-synth-exec/test_stream_0
Binary files differ
diff --git a/ctf/src/main/resources/debuginfo-synth-two-processes/metadata b/ctf/src/main/resources/debuginfo-synth-two-processes/metadata
new file mode 100644
index 0000000..c7dd5ff
--- /dev/null
+++ b/ctf/src/main/resources/debuginfo-synth-two-processes/metadata
@@ -0,0 +1,114 @@
+/* CTF 1.8 */
+
+trace {
+	major = 1;
+	minor = 8;
+	uuid = "1a0f0bbf-0c77-4aeb-9b8c-53f927f8b243";
+	byte_order = le;
+	packet.header := struct {
+		integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } magic;
+		integer { size = 8; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } uuid[16];
+		integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } stream_id;
+	} align(8);
+};
+
+env {
+	domain = "ust";
+	tracer_name = "lttng-ust";
+	tracer_major = 2;
+	tracer_minor = 8;
+};
+
+clock {
+	name = A_clock;
+	uuid = "11679fcc-59a6-4148-b694-cf76ab9dcc84";
+	description = "Simple clock";
+	freq = 1000000000;
+	precision = 1;
+	offset_s = 0;
+	offset = 0;
+	absolute = FALSE;
+};
+
+stream {
+	id = 0;
+	event.header := struct {
+		integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } id;
+		integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; map = clock.A_clock.value; } timestamp;
+	} align(8);
+
+	packet.context := struct {
+		integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } timestamp_begin;
+		integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } timestamp_end;
+		integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } content_size;
+		integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } packet_size;
+		integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } events_discarded;
+		integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } cpu_id;
+	} align(8);
+
+	event.context := struct {
+		integer { size = 64; align = 8; signed = false; encoding = none; base = hexadecimal; byte_order = le; } _ip;
+		integer { size = 32; align = 8; signed = true; encoding = none; base = decimal; byte_order = le; } _vpid;
+	} align(8);
+};
+
+event {
+	id = 0;
+	name = "dummy_event";
+	stream_id = 0;
+	fields := struct {
+	} align(1);
+};
+
+event {
+	id = 1;
+	name = "lttng_ust_statedump:bin_info";
+	stream_id = 0;
+	fields := struct {
+		integer { size = 64; align = 8; signed = false; encoding = none; base = hexadecimal; byte_order = le; } _baddr;
+		integer { size = 64; align = 8; signed = false; encoding = none; base = hexadecimal; byte_order = le; } _memsz;
+		string { encoding = UTF8; } _path;
+		integer { size = 8; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } _is_pic;
+		integer { size = 8; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } _has_build_id;
+		integer { size = 8; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } _has_debug_link;
+	} align(8);
+};
+
+event {
+	id = 2;
+	name = "lttng_ust_statedump:build_id";
+	stream_id = 0;
+	fields := struct {
+		integer { size = 64; align = 8; signed = false; encoding = none; base = hexadecimal; byte_order = le; } _baddr;
+		integer { size = 64; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } __build_id_length;
+		integer { size = 8; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } _build_id[__build_id_length];
+	} align(8);
+};
+
+event {
+	id = 3;
+	name = "lttng_ust_statedump:debug_link";
+	stream_id = 0;
+	fields := struct {
+		integer { size = 64; align = 8; signed = false; encoding = none; base = hexadecimal; byte_order = le; } _baddr;
+		integer { size = 32; align = 8; signed = false; encoding = none; base = decimal; byte_order = le; } _crc;
+		string { encoding = UTF8; } _filename;
+	} align(8);
+};
+
+event {
+	id = 4;
+	name = "lttng_ust_statedump:end";
+	stream_id = 0;
+	fields := struct {
+	} align(1);
+};
+
+event {
+	id = 5;
+	name = "lttng_ust_statedump:start";
+	stream_id = 0;
+	fields := struct {
+	} align(1);
+};
+
diff --git a/ctf/src/main/resources/debuginfo-synth-two-processes/test_stream_0 b/ctf/src/main/resources/debuginfo-synth-two-processes/test_stream_0
new file mode 100644
index 0000000..f03898b
--- /dev/null
+++ b/ctf/src/main/resources/debuginfo-synth-two-processes/test_stream_0
Binary files differ
diff --git a/ctf/src/main/resources/debuginfo-test-app4/channel0_0 b/ctf/src/main/resources/debuginfo-test-app4/channel0_0
new file mode 100644
index 0000000..bb0cd53
--- /dev/null
+++ b/ctf/src/main/resources/debuginfo-test-app4/channel0_0
Binary files differ
diff --git a/ctf/src/main/resources/debuginfo-test-app4/channel0_1 b/ctf/src/main/resources/debuginfo-test-app4/channel0_1
new file mode 100644
index 0000000..ee4f81a
--- /dev/null
+++ b/ctf/src/main/resources/debuginfo-test-app4/channel0_1
Binary files differ
diff --git a/ctf/src/main/resources/debuginfo-test-app4/channel0_2 b/ctf/src/main/resources/debuginfo-test-app4/channel0_2
new file mode 100644
index 0000000..ece06a3
--- /dev/null
+++ b/ctf/src/main/resources/debuginfo-test-app4/channel0_2
Binary files differ
diff --git a/ctf/src/main/resources/debuginfo-test-app4/channel0_3 b/ctf/src/main/resources/debuginfo-test-app4/channel0_3
new file mode 100644
index 0000000..9f5ac6b
--- /dev/null
+++ b/ctf/src/main/resources/debuginfo-test-app4/channel0_3
Binary files differ
diff --git a/ctf/src/main/resources/debuginfo-test-app4/index/channel0_0.idx b/ctf/src/main/resources/debuginfo-test-app4/index/channel0_0.idx
new file mode 100644
index 0000000..451f93a
--- /dev/null
+++ b/ctf/src/main/resources/debuginfo-test-app4/index/channel0_0.idx
Binary files differ
diff --git a/ctf/src/main/resources/debuginfo-test-app4/index/channel0_1.idx b/ctf/src/main/resources/debuginfo-test-app4/index/channel0_1.idx
new file mode 100644
index 0000000..679e610
--- /dev/null
+++ b/ctf/src/main/resources/debuginfo-test-app4/index/channel0_1.idx
Binary files differ
diff --git a/ctf/src/main/resources/debuginfo-test-app4/index/channel0_2.idx b/ctf/src/main/resources/debuginfo-test-app4/index/channel0_2.idx
new file mode 100644
index 0000000..2e1a193
--- /dev/null
+++ b/ctf/src/main/resources/debuginfo-test-app4/index/channel0_2.idx
Binary files differ
diff --git a/ctf/src/main/resources/debuginfo-test-app4/index/channel0_3.idx b/ctf/src/main/resources/debuginfo-test-app4/index/channel0_3.idx
new file mode 100644
index 0000000..d93c7af
--- /dev/null
+++ b/ctf/src/main/resources/debuginfo-test-app4/index/channel0_3.idx
Binary files differ
diff --git a/ctf/src/main/resources/debuginfo-test-app4/metadata b/ctf/src/main/resources/debuginfo-test-app4/metadata
new file mode 100644
index 0000000..503c443
--- /dev/null
+++ b/ctf/src/main/resources/debuginfo-test-app4/metadata
Binary files differ
diff --git a/pom.xml b/pom.xml
index 2084b08..d9829d4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -18,7 +18,7 @@
 
   <groupId>org.eclipse.tracecompass.testtraces</groupId>
   <artifactId>tracecompass-test-traces-parent</artifactId>
-  <version>1.4.0</version>
+  <version>1.5.0</version>
   <packaging>pom</packaging>
 
   <properties>
diff --git a/update-site/pom.xml b/update-site/pom.xml
index fd9a661..018139e 100644
--- a/update-site/pom.xml
+++ b/update-site/pom.xml
@@ -16,7 +16,7 @@
   <parent>
     <groupId>org.eclipse.tracecompass.testtraces</groupId>
     <artifactId>tracecompass-test-traces-parent</artifactId>
-    <version>1.4.0</version>
+    <version>1.5.0</version>
   </parent>
 
   <artifactId>tracecompass-test-traces-update-site</artifactId>