Introduce call flags.
A central place for metainfo such as whether a call terminates a frame
or not, etc.
No trace format changes yet. Will introduce them later after more
careful thought.
diff --git a/common/trace_parser.hpp b/common/trace_parser.hpp
index 8b071f5..73bb776 100644
--- a/common/trace_parser.hpp
+++ b/common/trace_parser.hpp
@@ -59,6 +59,10 @@
typedef std::list<Call *> CallList;
CallList calls;
+ struct FunctionSigFlags : public FunctionSig {
+ CallFlags flags;
+ };
+
// Helper template that extends a base signature structure, with additional
// parsing information.
template< class T >
@@ -69,7 +73,7 @@
File::Offset offset;
};
- typedef SigState<FunctionSig> FunctionSigState;
+ typedef SigState<FunctionSigFlags> FunctionSigState;
typedef SigState<StructSig> StructSigState;
typedef SigState<EnumSig> EnumSigState;
typedef SigState<BitmaskSig> BitmaskSigState;
@@ -84,6 +88,8 @@
EnumMap enums;
BitmaskMap bitmasks;
+ FunctionSig *glGetErrorSig;
+
unsigned next_call_no;
public:
@@ -122,11 +128,14 @@
protected:
Call *parse_call(Mode mode);
- FunctionSig *parse_function_sig(void);
+ FunctionSigFlags *parse_function_sig(void);
StructSig *parse_struct_sig();
EnumSig *parse_enum_sig();
BitmaskSig *parse_bitmask_sig();
+ static CallFlags
+ lookupCallFlags(const char *name);
+
Call *parse_Call(Mode mode);
void parse_enter(Mode mode);
@@ -135,6 +144,8 @@
bool parse_call_details(Call *call, Mode mode);
+ void adjust_call_flags(Call *call);
+
void parse_arg(Call *call, Mode mode);
Value *parse_value(void);