*
**************************************************************************/
+/*
+ * Trace writing functions.
+ */
+
#ifndef _TRACE_WRITE_HPP_
#define _TRACE_WRITE_HPP_
+#include <stddef.h>
+
namespace Trace {
typedef unsigned Id;
const char **args;
};
+ struct StructSig {
+ Id id;
+ const char *name;
+ unsigned num_members;
+ const char **members;
+ };
+
struct EnumSig {
Id id;
const char *name;
void Open(void);
void Close(void);
-
+
unsigned BeginEnter(const FunctionSig &function);
void EndEnter(void);
-
+
void BeginLeave(unsigned call);
void EndLeave(void);
-
+
void BeginArg(unsigned index);
inline void EndArg(void) {}
inline void BeginElement(void) {}
inline void EndElement(void) {}
- void BeginStruct(size_t length);
+ void BeginStruct(const StructSig *sig);
inline void EndStruct(void) {}
- void BeginMember(const char *name);
- inline void EndMember(void) {}
-
void LiteralBool(bool value);
void LiteralSInt(signed long long value);
void LiteralUInt(unsigned long long value);