Project

General

Profile

Actions

Bug #875

closed

Lookup for sequence length field failed

Added by Philippe Proulx over 9 years ago. Updated about 4 years ago.

Status:
Invalid
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
01/20/2015
Due date:
% Done:

0%

Estimated time:

Description

Using Babeltrace 1.2.0, it's not possible to specify a previous structure's field directly as the length of a sequence.

Metadata:

/* CTF 1.8 */

trace {
    major = 1;
    minor = 8;
    byte_order = le;
};

event {
    name = "file";
    fields := struct {
        struct {
            integer {
                size = 8;
            } len;
        } structure;

        integer {
            size = 32;
        } sequence[structure.len];
    };
};

Stream:


abcdabcdabcdabcdabcdabcdabcdabcdabcdabc

Babeltrace output:

[error] Lookup for sequence length field failed.
[error] Unable to create event definition for event "file".
[error] Unable to create stream (0) definitions: Invalid argument
[error] Stream index creation error.
[error] Open file stream error.
[warning] [Context] Cannot open_trace of format ctf at path ..
[warning] [Context] cannot open trace "." from . for reading.
[error] Cannot open any trace for reading.

[error] opening trace "." for reading.

[error] none of the specified trace paths could be opened.

The following metadata works, however, using an absolute lookup path (event.fields.structure.len):

/* CTF 1.8 */

trace {
    major = 1;
    minor = 8;
    byte_order = le;
};

event {
    name = "file";
    fields := struct {
        struct {
            integer {
                size = 8;
            } len;
        } structure;

        integer {
            size = 32;
        } sequence[event.fields.structure.len];
    };
};
Actions #1

Updated by Mathieu Desnoyers almost 9 years ago

Very likely an issue in bt_lookup_path_definition().

Actions #2

Updated by Jonathan Rajotte Julien about 4 years ago

  • Status changed from New to Invalid

State of babeltrace moved a lot since.

Closing this ticket as invalid. Reopen it if it stills apply to Babeltrace 2.

Actions

Also available in: Atom PDF