} end;
uint32_t lost_size; /* Size unused at the end of the buffer */
uint32_t buf_size; /* The size of this sub-buffer */
} end;
uint32_t lost_size; /* Size unused at the end of the buffer */
uint32_t buf_size; /* The size of this sub-buffer */
+ struct ltt_trace_header_any trace[0];
header = (struct ltt_block_start_header*)tf->buffer.head;
header = (struct ltt_block_start_header*)tf->buffer.head;
- if(parse_trace_header(header->trace, tf, NULL)) goto unmap_file;
+ if(parse_trace_header(header->trace, tf, NULL)) {
+ g_warning("parse_trace_header error");
+ goto unmap_file;
+ }
//store the size of the file
tf->file_size = lTDFStat.st_size;
//store the size of the file
tf->file_size = lTDFStat.st_size;
g_assert(group->len > 0);
tf = &g_array_index (group, LttTracefile, 0);
header = (struct ltt_block_start_header*)tf->buffer.head;
g_assert(group->len > 0);
tf = &g_array_index (group, LttTracefile, 0);
header = (struct ltt_block_start_header*)tf->buffer.head;
- g_assert(parse_trace_header(header->trace, tf, t) == 0);
+ g_assert(parse_trace_header(header->trace,
+ tf, t) == 0);
/* seek over the buffer header if we are at the buffer start */
if(tf->event.offset == 0) {
/* seek over the buffer header if we are at the buffer start */
if(tf->event.offset == 0) {
- tf->event.offset += sizeof(struct ltt_block_start_header)
- + tf->buffer_header_size;
+ tf->event.offset += tf->buffer_header_size;
if(tf->event.offset == tf->buf_size - tf->buffer.lost_size) {
ret = ERANGE;
if(tf->event.offset == tf->buf_size - tf->buffer.lost_size) {
ret = ERANGE;