X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=common%2Ftrace_parser.hpp;h=0ae3a28d682b80ad6034e1c8daa88fec91362064;hb=677f59a10bf71b0bf1b73bfc9c1accbf719fafad;hp=3aaa6d3a93f16cb71c85116185cee0d4d9cba14e;hpb=ae2b4d32ed56e3ac193cc7205aeb58082c448ce8;p=apitrace diff --git a/common/trace_parser.hpp b/common/trace_parser.hpp index 3aaa6d3..0ae3a28 100644 --- a/common/trace_parser.hpp +++ b/common/trace_parser.hpp @@ -33,9 +33,10 @@ #include "trace_file.hpp" #include "trace_format.hpp" #include "trace_model.hpp" +#include "trace_api.hpp" -namespace Trace { +namespace trace { struct ParseBookmark @@ -59,6 +60,10 @@ protected: typedef std::list 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 +74,7 @@ protected: File::Offset offset; }; - typedef SigState FunctionSigState; + typedef SigState FunctionSigState; typedef SigState StructSigState; typedef SigState EnumSigState; typedef SigState BitmaskSigState; @@ -84,10 +89,13 @@ protected: EnumMap enums; BitmaskMap bitmasks; + FunctionSig *glGetErrorSig; + unsigned next_call_no; public: unsigned long long version; + API api; Parser(); @@ -122,11 +130,15 @@ public: protected: Call *parse_call(Mode mode); - FunctionSig *parse_function_sig(void); + FunctionSigFlags *parse_function_sig(void); StructSig *parse_struct_sig(); + EnumSig *parse_old_enum_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 +147,8 @@ protected: 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); @@ -181,9 +195,15 @@ protected: Value *parse_opaque(); void scan_opaque(); + Value *parse_repr(); + void scan_repr(); + const char * read_string(void); void skip_string(void); + signed long long read_sint(void); + void skip_sint(void); + unsigned long long read_uint(void); void skip_uint(void); @@ -192,6 +212,6 @@ protected: }; -} /* namespace Trace */ +} /* namespace trace */ #endif /* _TRACE_PARSER_HPP_ */