X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=trace_format.hpp;h=a8ee5eb8bab0347ce2a691691783d6c6939f6d22;hb=3887a0e91e021305b062e2ed280e05fee2a9f846;hp=3a3787b5b292eed2fe389ef4217e562077be01a3;hpb=2603acf99672788aaf9797c989cddc39fa0b35cb;p=apitrace diff --git a/trace_format.hpp b/trace_format.hpp index 3a3787b..a8ee5eb 100644 --- a/trace_format.hpp +++ b/trace_format.hpp @@ -24,7 +24,47 @@ **************************************************************************/ /* - * Binary trace format decription. + * Trace binary format. + * + * Grammar: + * + * trace = event* EOF + * + * event = EVENT_ENTER call_sig call_detail+ + * | EVENT_LEAVE call_no call_detail+ + * + * call_sig = sig_id ( name arg_names )? + * + * call_detail = ARG index value + * | RET value + * | END + * + * value = NULL + * | FALSE + * | TRUE + * | SINT int + * | UINT int + * | FLOAT float + * | DOUBLE double + * | STRING string + * | BLOB string + * | ENUM enum_sig + * | BITMASK bitmask_sig value + * | ARRAY length value+ + * | STRUCT struct_sig value+ + * | OPAQUE int + * + * call_sig = id name arg_name* + * | id + * + * enum_sig = id name value + * | id + * + * bitmask_sig = id count (name value)+ + * | id + * + * string = length (BYTE)* + * */ #ifndef _TRACE_FORMAT_HPP_ @@ -37,7 +77,6 @@ namespace Trace { enum Event { EVENT_ENTER = 0, EVENT_LEAVE, - EVENT_MESSAGE }; enum CallDetail { @@ -64,37 +103,6 @@ enum Type { TYPE_OPAQUE, }; -/* - * XXX: Update grammar. - * - * trace = call* EOF - * - * call = name (detail)* END - * - * detail = ARG name value - * | RET value - * | ... - * - * value = VOID - * | BOOL BOOL_VALUE - * | SINT INT_VALUE - * | UINT INT_VALUE - * | FLOAT FLOAT_VALUE - * | STRING string - * | BLOB string - * | CONST name value - * | BITMASK value+ - * | ARRAY length - * - * bool = 0 | 1 - * - * name = string - * - * string = length (BYTE)* - * - * length = INT_VALUE - */ - } /* namespace Trace */