X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=retrace.py;fp=retrace.py;h=a450f8221ea47499622b118896fa6ed0f6783720;hb=1da480dd320a9d3d631a94025ca40609099f6d34;hp=ee85f29d6d5de771e08b488ae0558a3e5d12a14f;hpb=b5e8138d32a9901df0dd0b9c1ae0b997cfed0d68;p=apitrace diff --git a/retrace.py b/retrace.py index ee85f29..a450f82 100644 --- a/retrace.py +++ b/retrace.py @@ -327,9 +327,7 @@ class Retracer: print def retraceFunctionBody(self, function): - if not function.sideeffects: - print ' (void)call;' - return + assert function.sideeffects self.deserializeArgs(function) @@ -338,9 +336,7 @@ class Retracer: self.swizzleValues(function) def retraceInterfaceMethodBody(self, interface, method): - if not method.sideeffects: - print ' (void)call;' - return + assert method.sideeffects self.deserializeThisPointer(interface) @@ -470,18 +466,26 @@ class Retracer: functions = filter(self.filterFunction, api.functions) for function in functions: - self.retraceFunction(function) + if function.sideeffects: + self.retraceFunction(function) interfaces = api.getAllInterfaces() for interface in interfaces: for method in interface.iterMethods(): - self.retraceInterfaceMethod(interface, method) + if method.sideeffects: + self.retraceInterfaceMethod(interface, method) print 'const retrace::Entry %s[] = {' % self.table_name for function in functions: - print ' {"%s", &retrace_%s},' % (function.name, function.name) + if function.sideeffects: + print ' {"%s", &retrace_%s},' % (function.name, function.name) + else: + print ' {"%s", &retrace::ignore},' % (function.name,) for interface in interfaces: - for method in interface.iterMethods(): - print ' {"%s::%s", &retrace_%s__%s},' % (interface.name, method.name, interface.name, method.name) + for method in interface.iterMethods(): + if method.sideeffects: + print ' {"%s::%s", &retrace_%s__%s},' % (interface.name, method.name, interface.name, method.name) + else: + print ' {"%s::%s", &retrace::ignore},' % (interface.name, method.name) print ' {NULL, NULL}' print '};' print