From 683676ca4bfc4b7b37f4967498c95af35b9622f2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Fonseca?= Date: Sun, 22 May 2011 00:10:50 +0100 Subject: [PATCH] Update trace binary format description. --- trace_format.hpp | 73 +++++++++++++++++++++++++++--------------------- 1 file changed, 41 insertions(+), 32 deletions(-) diff --git a/trace_format.hpp b/trace_format.hpp index ee936cc..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_ @@ -63,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 */ -- 2.45.2