This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
And what is the format of that "raw" data? Exactly the format
described in the manual, in the "Trace File Format" node:
"The trace frame section consists of a number of consecutive frames. Each frame begins with a two-byte tracepoint number, followed by a four-byte size giving the amount of data in the frame. The data in the frame consists of a number of blocks, each introduced by a character indicating its type (at least register, memory, and trace state variable). The data in this section is raw binary, not a hexadecimal or other encoding; its endianness matches the target's endianness."
So it's not really "raw" binary data -- there's a format, with headers and all. And it can't be any other format, otherwise the patch's design won't work... (**)
> >TFILE is a format that composed by ascii definition part and trace frames dumped from the raw data directly. There could be another trace file format FOO that stores raw data as well.It's not "raw". It's trace frames in gdb's trace file format as defined in the manual.
Again, it is not trace file format. It is how data are stored in trace buffers.>(**) ... as can be seen here and below with>>> >+ { >>> >+ uint16_t tp_num; >>> >+ uint32_t tf_size; >>> >+ unsigned int read_length; >>> >+ unsigned int block; >>> >+ >>> >+ /* Read the first six bytes in, which is the tracepoint >>> >+ number and trace frame size. */ >>> >+ gotten = target_get_raw_trace_data (buf, offset, 6); >>> >+ >>> >+ if (gotten == 0) >>> >+ break; >>> >+ tp_num = (uint16_t) >>> >+ extract_unsigned_integer (&buf[0], 2, byte_order); >>> >+ >>> >+ tf_size = (uint32_t) >>> >+ extract_unsigned_integer (&buf[2], 4, byte_order);
+ switch (block_type) + { + case 'R': ... + case 'M': ...
etc.
This is parsing the "raw"'s headers, in gdb's trace file format. This as the else branch. The "then" branch only works if the target can interpret "buf" as trace frames in gdb's trace file format.
-- Yao (éå)
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |