Marcin KoÅcielnicki <koriakin@0x04.net> writes:
1. target.xml is read from the target.
2. Includes are processed, resulting in a single in-memory XML file
containing all the data.
3. The resulting file is stored in tfile header by prefixing every line
with "tdesc ". We may insert a spurious newline at the end of file
with this encoding, but that won't matter for XML.
4. When tfile is read, the XML is stored in an allocated buffer, and
xfer for TARGET_OBJECT_AVAILABLE_FEATURES is implemented, reading
from it.
5. target_find_description is called to force reading it.
The target description is a global state in trace file, so it doesn't
work tracepoints have different target descriptions, for example in
multi-inferior case, one is x86 and the other one is x86_64 (and arm vs
aarch64 too), and we have tracepoints set in two processes.
I know tracepoint doesn't support multi-inferior/multi-process, but we
may support that in the future. Since we are changing tracepoint file
format, we'd better think about this a little bit. Can we save multiple
target descriptions in trace file, and associate the tracepoints to the
right target description in trace file?