]> git.cworth.org Git - apitrace/commitdiff
Update trace binary format description.
authorJosé Fonseca <jose.r.fonseca@gmail.com>
Sat, 21 May 2011 23:10:50 +0000 (00:10 +0100)
committerJosé Fonseca <jose.r.fonseca@gmail.com>
Sat, 21 May 2011 23:10:50 +0000 (00:10 +0100)
trace_format.hpp

index ee936cc4f99b073b7f2215efcaf32f9aea339724..a8ee5eb8bab0347ce2a691691783d6c6939f6d22 100644 (file)
  **************************************************************************/
 
 /*
- * 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 */