X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;ds=sidebyside;f=retrace.py;h=81652e5eddb1afd0bf9ec9ffab8be71fe4552c35;hb=c017dded3f1b3ebe3043b0e217bb3cd76a4e1a4e;hp=9e42be38b874edd0f25404f7773e6cad2975a311;hpb=c90658521fa879fc439608099563ce491b69dfdc;p=apitrace diff --git a/retrace.py b/retrace.py index 9e42be3..81652e5 100644 --- a/retrace.py +++ b/retrace.py @@ -186,6 +186,9 @@ class Retracer: print def retrace_function_body(self, function): + if not function.sideeffects: + return + success = True for arg in function.args: arg_type = ConstRemover().visit(arg.type) @@ -241,8 +244,7 @@ class Retracer: functions = filter(self.filter_function, functions) for function in functions: - if function.sideeffects: - self.retrace_function(function) + self.retrace_function(function) print 'void retrace::retrace_call(Trace::Call &call) {' print ' const char *name = call.name().c_str();' @@ -252,8 +254,7 @@ class Retracer: def handle_case(function_name): function = func_dict[function_name] - if function.sideeffects: - print ' retrace_%s(call);' % function.name + print ' retrace_%s(call);' % function.name print ' return;' string_switch('name', func_dict.keys(), handle_case)