This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 0/4] Save target description in tfile.
- From: Pedro Alves <palves at redhat dot com>
- To: Marcin KoÅcielnicki <koriakin at 0x04 dot net>, gdb-patches at sourceware dot org
- Date: Wed, 10 Feb 2016 14:24:42 +0000
- Subject: Re: [PATCH 0/4] Save target description in tfile.
- Authentication-results: sourceware.org; auth=none
- References: <1454773157-31569-1-git-send-email-koriakin at 0x04 dot net>
On 02/06/2016 03:39 PM, Marcin KoÅcielnicki wrote:
> As discussed in the s390 trace thread, this adds target description
> in XML format to tfile format. The idea is simple:
>
> 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.
>
> Patch #1 makes tsave write the XML data into tfile. Patch #2 makes
> tfile reader fetch and parse this data. Patch #3 fixes wrong register
> ordering in tfile_fetch_registers (noticed on x86_64 with AVX -
> plain x86_64 was apparently fine). Patch #4 fixes an off-by-one
> in the same function that prevented fetching the last register
> (orig_rax for plain x86_64, $ymm15h for x86_64 with AVX).
>
I'd be good to also document the tdesc header lines in
the "Trace File Format" node in the manual.
Thanks,
Pedro Alves